(function () {window._dt_dynad_5550001461_15507608029671284455760='';window._tp_dynad_5550001461_15507608029671284455760={};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}};
window._DADB_5550001461_15507608029671284455760=DADB;
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}};
window._DAFIFO_5550001461_15507608029671284455760=DAFIFO;
new DADB(function(db){db.getCk('optout',function(k,v){if(v!=='1'){(function(customerId, placementId, campaignId, creativeId, timestamp, lookBackWindow, action){setTimeout(function(){new DADB(function(a){"I"==action?new DAFIFO(100,"d"+customerId+"W",a,15552e3,function(a){a.push(placementId+"|"+campaignId+"|"+creativeId+"|"+timestamp+"|"+(timestamp+24*lookBackWindow*3600),function(){a.commit(function(){a.list(function(b){for(var c in b){var d=b[c].split("|");d[d.length-1]<timestamp&&a.remove(b[c],function(){a.commit()})}})})})}):"D"==action?new DAFIFO(100,"d"+customerId+"W",a,15552e3,function(a){a.list(function(b){for(var c in b)els[els.length-1]<timestamp&&a.remove(b[c],function(){a.commit()}),b[c].indexOf(placementId+"|"+campaignId+"|"+creativeId+"|")>-1&&a.remove(b[c],function(){a.commit()})})}):"R"==action&&new DAFIFO(100,"d"+customerId+"W",a,15552e3,function(a){a.list(function(b){var c="";for(var d in b)c+=(""==c?"":";")+b[d];a.clear(function(){a.commit(function(){callback(c)})})})})});},0,customerId,placementId,campaignId,creativeId,timestamp,lookBackWindow,action);})(20160221,5550001461,5000002952,4000036714,1550760832,30,'I');}else{db.setCk('uid','',0)}})});
var ele=document.createElement("div");ele.setAttribute("id","_dynad_c_I5550001461_15507608029671284455760");ele.setAttribute("style","background-color:white; border:0; z-index:2999999; margin:0; overflow:hidden; visibility:visible; display:block; width:100%; position:absolute; height:0px; ");var target=(function(isIE){if (console && console.log)
    console.log('[dynad-core] - [', Date.now(), '] - DynAd TAG was loaded by client.');

var isMobile = {
    Android: function() {
        return navigator.userAgent.match(/Android/i);
    },
    BlackBerry: function() {
        return navigator.userAgent.match(/BlackBerry/i);
    },
    iOS: function() {
        return navigator.userAgent.match(/iPhone|iPad|iPod/i);
    },
    Opera: function() {
        return navigator.userAgent.match(/Opera Mini/i);
    },
    Windows: function() {
        return navigator.userAgent.match(/IEMobile/i) || navigator.userAgent.match(/WPDesktop/i);
    },
    any: function() {
        return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
    }
};
if( isMobile.any() ) {
    if( typeof window.DYNAD_TV !== 'undefined' && typeof window.DYNAD_TV.eventListener !== 'undefined' )
    	window.DYNAD_TV.eventListener("nodata", "device not supported.");
    return null;
}

if( document.querySelector('.mod-hibrido-superfoto') ) {
    window.DYNAD_TV.config.container.obj = document.querySelector('.mod-hibrido-superfoto');
} else if( document.querySelector('.mod-super-foto') ) {
    window.DYNAD_TV.config.container.obj = document.querySelector('.mod-super-foto');
} else {
    if( document.location.hostname == 'www.uol.com.br' ) {
        var _width = (document.documentElement.clientWidth || document.body.clientWidth || window.innerWidth) - 1190;
        if( _width > 2 ) _width = _width / 2;
        if( _width < 0 ) _width = 0;
        var divE = document.createElement('div'); 
        divE.setAttribute('id', 'dynad-tv-floater');
        divE.setAttribute('style', 'position: absolute;width: 680px; top: 379px;z-index: 29999999; height: 0px;background-color: red; left: '+ _width +'px;'); 
        document.body.appendChild(divE);
        window.DYNAD_TV.config.container.obj = divE;
    } else {
        window.DYNAD_TV.config.container.obj = document.getElementById('banner-1x1-11-Area');
    }
}


if( document.querySelector('.mod-super-foto') || document.querySelector('.mod-hibrido-superfoto') ) {
    if( typeof window.DYNAD_TV.config.settings === 'undefined' ) 
        window.DYNAD_TV.config.settings = {};
    window.DYNAD_TV.config.settings['enableShadow'] = 'true';
}

if( typeof window.DYNAD_TV !== 'undefined' && typeof window.DYNAD_TV.config !== 'undefined' && typeof window.DYNAD_TV.config.container.obj !== 'undefined' ) {
    try { 
        window.DYNAD_TV.config.container.obj.style.position = 'relative';
        window.DYNAD_TV.config.container.obj.style.overflow = 'visible';
    } catch(e){
        window.DYNAD_TV.eventListener("nodata", "container was not found.");
        if( console && console.log )
            console.log('[dynadtv-core] - could not locate container, called nodata listener.');
        return null;
    }
    return window.DYNAD_TV.config.container.obj;
} else {
    if( typeof window.DYNAD_TV !== 'undefined' && typeof window.DYNAD_TV.eventListener !== 'undefined' )
    	window.DYNAD_TV.eventListener("nodata", "container was not found.");
    return null;
}})(false);if(typeof target==='undefined'||target==null)return;else{try{target.appendChild(ele);}catch(e){if(typeof console!=='undefined'&&typeof console.log!=='undefined')console.log(e);}}var tagParameters=window._tp_dynad_5550001461_15507608029671284455760;var dt_dynad=window._dt_dynad_5550001461_15507608029671284455760;var divAppender=function(s){var n='';var r=s.replace(/<script[^>]*>([\s\S]*?)<\/script>/gi,function(){n+=arguments[1]+'\n';return '';});document.getElementById('_dynad_c_I5550001461_15507608029671284455760').innerHTML=r;if(window.execScript&&n!='') window.execScript(n); else if(n!='')eval(n);};try{
var _rp15507608029671284455760=(function(reqid,type,step,containerId,placementId){try{if (step == 1) {
    ! function(e, t, o) {
        "function" == typeof define && define.amd ? define([], o) : "undefined" != typeof module && "object" == typeof exports ? module.exports = o() : e[t] = o()
    }(this, "withinviewport", function() {
        //
        // retorna as dimensoes do iframe e a posicao relativa ao viewport
        //
        var e = void 0 !== window.innerHeight,
            t = function o(t, n) {
                var i, d, r, a = !1,
                    f = {},
                    p = {};
                return i = "string" == typeof n ? {
                    sides: n
                } : n || {}, p.container = i.container || f.container || o.defaults.container || window, p.sides = i.sides || f.sides || o.defaults.sides || "all", p.top = i.top || f.top || o.defaults.top || 0, p.right = i.right || f.right || o.defaults.right || 0, p.bottom = i.bottom || f.bottom || o.defaults.bottom || 0, p.left = i.left || f.left || o.defaults.left || 0, (p.container === document.body || 1 === !p.container.nodeType) && (p.container = window), d = {
                    e: function() {
                        var t;
                        if (t = e || p.container !== window ? p.container.innerHeight : document.documentElement.clientHeight, "undefined" != typeof window.expanded) return r.top > -(n / 2) && r.bottom < t + (n / 2);
                        var o = r.top > 0 && r.top < t - (n / 2);
                        return o && "undefined" == typeof window.expanded && (window.expanded = !0), o
                    }
                }, r = t.getBoundingClientRect(), a = d.e() ? !0 : !1
            };
        return t.prototype.defaults = {
            container: document.body,
            sides: "all",
            top: 0,
            right: 0,
            bottom: 0,
            left: 0
        }, t.defaults = t.prototype.defaults, t
    });
}

if (step == 2) {
    if (typeof window.DYNAD_TV === 'undefined')
        window.DYNAD_TV = {
            'config': {
                'URL_VAST': 'https://pubads.g.doubleclick.net/gampad/ads?slotname=/8804/teste/inread&sz=640x480&ciu_szs=&url=%5Breferrer_url%5D&unviewed_position_start=1&output=xml_vast3&impl=s&env=vp&gdfp_req=1&ad_rule=0&video_url_to_fetch=%5Bdescription_url%5D&vad_type=linear&vpos=preroll&pod=1&min_ad_duration=0&max_ad_duration=999999000&ppos=1&lip=true&correlator=' + new Date().getTime() + Math.random()
            }
        };

    function DynAdTvKeeper(container) {
        var idTimeout = null;
        var STATUS = {
            INITIALIZED: 0,
            LOADED: 1,
            PLAYING: 2,
            PAUSED: 3,
            CLOSED: 5,
            TIMEOUT: 4
        };

        var status = STATUS.INITIALIZED,
            height = 0,
            width = 0,
            vHeight = 0,
            vWidth = 0,
            isMouseOverIfrm = false,
            addMarginOnTop = 0,
            shadowBox = null,
            comScoreStreamingTag = null,
            comScoreStreamingTagID = null,
            adVideoDuration = 30000;

        var idAdSystem = "",
            idCreativeId = "",
            idAdId = "";

        function comScorePauseVideoAdvertisement() {
            try {
                if (comScoreStreamingTagID != null) {
                    comScoreStreamingTag = new Image();
                    comScoreStreamingTag.setAttribute('src', 'https://sb.scorecardresearch.com/p?c1=2&c2=27893134&ns_ap_sv=2.1511.10&ns_type=hidden&ns_st_it=a&ns_st_sv=4.0.0&ns_st_ad=1&ns_st_sq=1&ns_st_id=' + comScoreStreamingTagID + '&ns_st_ec=2&ns_st_cn=1&ns_st_ev=end&ns_st_ct=va11&ns_st_cl=' + adVideoDuration + '&ns_st_pt=' + adVideoDuration + '&c3=UOLADNET&c4=*null&c6=*null&ns_ts=' + Date.now());
                    if (console && console.log)
                        console.log("[dynad-tv] - called method stop at comScore streaming tag.");
                }
            } catch (exInitComScore) {
                if (console && console.error)
                    console.error("[dynad-tv] - failed to dispatch pause comScore streaming tag.", exInitComScore);
            }
        }

        function comScorePlayVideoAdvertisement() {
            try {
                if (comScoreStreamingTagID == null)
                    comScoreStreamingTagID = Date.now();
                comScoreStreamingTag = new Image();
                comScoreStreamingTag.setAttribute('src', 'https://sb.scorecardresearch.com/p?c1=2&c2=27893134&ns_ap_sv=2.1511.10&ns_type=hidden&ns_st_it=a&ns_st_sv=4.0.0&ns_st_ad=1&ns_st_sq=1&ns_st_id=' + comScoreStreamingTagID + '&ns_st_ec=1&ns_st_cn=1&ns_st_ev=play&ns_st_ct=va11&ns_st_cl=' + adVideoDuration + '&ns_st_pt=0&c3=UOLADNET&c4=*null&c6=*null&ns_ts=' + Date.now());
                if (console && console.log)
                    console.log("[dynad-tv] - called method play at comScore streaming tag.");
            } catch (exInitComScore) {
                comScoreStreamingTagID = null;
                if (console && console.error)
                    console.error("[dynad-tv] - failed to dispatch play comScore streaming tag.", exInitComScore);
            }
        }


        function addAdServerCounter(id) {
            var ic = document.createElement('img');
            ic.setAttribute('src', "https://t.dynad.net/pc/?dc=" + id + ";ord=" + Date.now());
            ic.setAttribute('style', 'width: 0px; height: 0px; visibility: hidden; position: absolute; z-index: 0;');
            divContainer.appendChild(ic);
        }

        function dispatchEventListener(eventName, eventData) {
            if (console && console.log)
                console.log('[dynad-core] - [', Date.now(), '] - [event: ', eventName, '] - [data: ', eventData, ']');
                
            if (status === STATUS.CLOSED)
                return;
            if (typeof window.DYNAD_TV !== 'undefined' && typeof window.DYNAD_TV.eventListener !== 'undefined') {
                if (typeof eventData !== 'undefined')
                    window.DYNAD_TV.eventListener(eventName, eventData);
                else
                    window.DYNAD_TV.eventListener(eventName);
            }
            if (eventName == 'closed' || eventName == 'nodata')
                status = STATUS.CLOSED;
        }

        function notifyMetricsMonitor() {
            try {
                if (Math.random() < 0.05) {
                    var script = document.createElement('script');
                    script.setAttribute('async', 'true');
                    script.setAttribute('type', 'text/javascript');
                    var foreignKeys = ['key1', 'key2'].toString();
                    window['callback'] = function(result) {};
                    script.setAttribute('src', '//metrics.dynad.net/resources/counter/jsonp/incWithFk/dynadtv/monitor/delivery/' + placementId + '?ord=' + Date.now() + '&callback=callback');
                    (document.head || document.getElementsByTagName("head")[0] || document.body || document.documentElement || document.getElementsByTagName('body')[0]).appendChild(script);
                }
            } catch (e) {
                if (console && console.error)
                    console.error('failed to append metrics monitoring pixel', e);
            }
        }

        function handle(e) {
            if (typeof e.data === 'undefined' || e.data == null)
                return;

            if (typeof e.data != 'string')
                return;

            if (e.data.indexOf('dynad-tv') == -1 || status == STATUS.TIMEOUT || status == STATUS.CLOSED)
                return;

            if (console && console.log)
                console.log('[dynad-core] - [', Date.now(), '] - ', e.data);

            if (e.data.indexOf('dynad-tv-protocol/loaded/') == 0) { // player foi carregado
                try {
                    if (idTimeout != null) {
                        clearTimeout(idTimeout);
                        idTimeout = null;
                    }
                } catch (e) {}

                status = STATUS.LOADED;
                if (typeof window.DYNAD_TV.config.container !== 'undefined' && typeof window.DYNAD_TV.config.container.width !== 'undefined') {
                    width = window.DYNAD_TV.config.container.width;
                    height = window.DYNAD_TV.config.container.height;
                } else {
                    var dm = e.data.substr('dynad-tv-protocol/loaded/'.length).split('/');
                    height = parseInt(dm[1]);
                    width = parseInt(dm[0]);

                    try {
                        if (height <= 0 || width <= 0) {
                            width = divContainer.parentNode.offsetWidth;
                            height = Math.floor((9 / 16) * width);
                        }
                    } catch (e) {}
                }

                try {
                    dispatchEventListener('loaded', {
                        'w': width,
                        'h': height
                    });
                } catch (exEvent) {}
                resize();
                follow();
                notifyMetricsMonitor();
            } else if (e.data.indexOf('dynad-tv-protocol/click/') == 0) { // player nao contem data
                try {
                    if (idTimeout != null) {
                        clearTimeout(idTimeout);
                        idTimeout = null;
                    }
                } catch (e) {}
                try {
                    dispatchEventListener('click');
                } catch (exEvent) {}
                addAdServerCounter(5550001579);
            } else if (e.data == 'dynad-tv-protocol/user_close') {
                container.contentWindow.postMessage('dynad-tv-protocol/force_close_linear', '*');
                window['callbackiruol_user_close'] = function(d) {};
                var e = document.createElement('script');
                e.setAttribute('type', 'text/javascript');
                e.setAttribute('async', 'true');
                e.setAttribute('src', '//metrics.dynad.net/resources/counter/jsonp/multipleIncWithFk/dynadtv/behavior/close_button_floating/override/?callback=callbackiruol_user_close&ord=' + Date.now() + '&override_0=' + encodeURIComponent(idAdSystem + '/' + idAdId + '/' + idCreativeId));
                divContainer.appendChild(e);
            } else if (e.data.indexOf('dynad-tv-protocol/impression_data/') == 0) {
                var op = e.data.substr(('dynad-tv-protocol/impression_data/').length).split('/');
                idAdSystem = op[1], idCreativeId = op[0], idAdId = op[2];
                try {
                    if (op.length > 3) {
                        adVideoDuration = Number(op[3]) * 1000;
                        if (adVideoDuration < 15000)
                            adVideoDuration = 15000
                    }
                } catch (exTimer) {}
            } else if (e.data.indexOf('dynad-tv-protocol/state_skip/') == 0) {
                var op = e.data.substr(('dynad-tv-protocol/state_skip/').length);
                divContainer.setAttribute('state_skip', (op == 'true' ? 'none' : 'block'));
                //var btCloseEle = document.getElementById('floater_bt_close_dynadtv_unique');
                //if( btCloseEle )
                //    btCloseEle.style.display = divContainer.getAttribute('state_skip');                       
                //document.getElementById('floater_bt_close_dynadtv').style.display = (op == 'true' ? 'none' : 'block');****/
            } else if (e.data.indexOf('dynad-tv-protocol/no_data/') == 0) { // player nao contem data
                try {
                    if (idTimeout != null) {
                        clearTimeout(idTimeout);
                        idTimeout = null;
                    }
                } catch (e) {}
                var m = e.data.substr('dynad-tv-protocol/no_data/'.length).split('/');
                try {
                    dispatchEventListener('nodata', m);
                } catch (exEvent) {}
                addAdServerCounter(5550001577);
                notifyMetricsMonitor();
            } else if (e.data == 'dynad-tv-protocol/close') {
                try {
                    dispatchEventListener('closed');
                } catch (exEvent) {}

                try {
                    if (idTimeout != null) {
                        clearTimeout(idTimeout);
                        idTimeout = null;
                    }
                } catch (e) {}

                if (shadowBox != null) {
                    divContainer.style.border = "0px";
                }
                divContainer.style.overflow = "hidden";

                divContainer.style.height = '0px';
                divContainer.style.width = '0%';
                divContainer.height = '0px';

                if (shadowBox != null)
                    shadowBox.parentNode.removeChild(shadowBox);

                setTimeout(function() {
                    container.parentNode.removeChild(container);
                    /***if( typeof window.DYNAD_TV.config.container !== 'undefined' && typeof window.DYNAD_TV.config.container.removeOnClose !== 'undefined' ) {
                        if( window.DYNAD_TV.config.container.removeOnClose === true )
                            window.DYNAD_TV.config.container.obj.parentNode.removeChild(window.DYNAD_TV.config.container.obj);
                    }***/
                }, 1000);

                dispose();
                comScorePauseVideoAdvertisement();
            } else if (e.data == 'dynad-tv-protocol/init') {
                if (document.hasFocus() === true) {
                    sendLoadMessage();
                } else {
                    try {
                    dispatchEventListener('nodata');
                    } catch (exEvent) {}

                    try {
                        if (idTimeout != null) {
                            clearTimeout(idTimeout);
                            idTimeout = null;
                        }
                    } catch (e) {}

                    if (shadowBox != null) {
                        divContainer.style.border = "0px";
                    }
                    divContainer.style.overflow = "hidden";

                    divContainer.style.height = '0px';
                    divContainer.style.width = '0%';
                    divContainer.height = '0px';

                    if (shadowBox != null)
                        shadowBox.parentNode.removeChild(shadowBox);

                    setTimeout(function() {
                        container.parentNode.removeChild(container);
                    }, 1000);

                    dispose();
                }
            } else if (e.data == 'dynad-tv-protocol/expand') {
                if (typeof window.DYNAD_TV.config.container !== 'undefined' && typeof window.DYNAD_TV.config.container.obj !== 'undefined') {
                
                    if( window.DYNAD_TV.config.container.obj.getAttribute('id') == 'dynad-tv-floater' )
                        window.DYNAD_TV.config.container.obj.style.position = 'absolute';
                    else
                        window.DYNAD_TV.config.container.obj.style.position = 'relative';
                        
                    if (window['dynad_skip_overflow_visible'] != true)
                        window.DYNAD_TV.config.container.obj.style.overflow = 'visible';
                }

                if (typeof window.DYNAD_TV.config.container !== 'undefined' && typeof window.DYNAD_TV.config.container.width !== 'undefined')
                    divContainer.style.width = window.DYNAD_TV.config.container.width + "px";
                else
                    divContainer.style.width = '100%';

                if (typeof window.DYNAD_TV.config.settings !== 'undefined' && window.DYNAD_TV.config.settings['enableShadow'] === 'true') {
                    if (typeof window.DYNAD_TV.config.container !== 'undefined' && typeof window.DYNAD_TV.config.container.obj !== 'undefined') {
                        divContainer.style.display = 'none';
                        var pcW = window.DYNAD_TV.config.container.obj.offsetWidth;
                        var mcW = window.DYNAD_TV.config.container.width;
                        if (pcW > mcW)
                            divContainer.style.marginLeft = Math.round((pcW - mcW) / 2) + "px";
                        divContainer.style.display = 'block';

                        var pcH = window.DYNAD_TV.config.container.obj.offsetHeight;
                        var mcH = window.DYNAD_TV.config.container.height;
                        if (pcH > mcH)
                            divContainer.style.marginTop = Math.round((pcH - mcH) / 2) + "px";

                        shadowBox = document.createElement('div');
                        shadowBox.setAttribute('style', 'position: absolute; top: 0px; left: 0px; width: ' + pcW + "px; height: " + pcH + "px; background:rgba(1,1,1,0.7); z-index: 2999998;");
                        window.DYNAD_TV.config.container.obj.appendChild(shadowBox);
                        divContainer.style.border = "1px solid white";
                        divContainer.style.overflow = "visible";
                    }
                }

                var applyHeight = (vHeight + addMarginOnTop);
                if (typeof window.DYNAD_TV.config.container !== 'undefined' && typeof window.DYNAD_TV.config.container.height !== 'undefined')
                    applyHeight = window.DYNAD_TV.config.container.height;
                else {

                }

                container.style.height = applyHeight + 'px';
                container.height = applyHeight + 'px';

                // Animação desligada em 21/03/2018 para testes de agilidade
                // divContainer.style.animationDuration = "1s";
                // divContainer.style.WebkitTransitionDuration = "1s";
                // divContainer.style.WebkitTransition = "1s";
                // divContainer.style.MozTransition = "1s";


                divContainer.style.height = applyHeight + 'px';
                divContainer.height = applyHeight + 'px';
                sendStartCounterMessage();
                try {
                    dispatchEventListener('expanded', {
                        'w': vWidth,
                        'h': applyHeight
                    });
                } catch (exEvent) {}
                addAdServerCounter(5550001580);
                comScorePlayVideoAdvertisement();

                var hasShadowBeingEnabled = false;
                try {
                    hasShadowBeingEnabled = window.DYNAD_TV.config.settings['enableShadow'] == 'true';
                } catch (e) {}

                var fontColor = "black";
                if (hasShadowBeingEnabled)
                    fontColor = "white";

                var close_button = document.createElement('div');
                close_button.style.setProperty('width', '34px');
                close_button.style.setProperty('height', '34px');
                close_button.style.setProperty('background-position', 'center');
                close_button.style.setProperty('background-repeat', 'no-repeat');
                close_button.style.setProperty('background-size', '24px');
                close_button.style.setProperty('background-image', 'url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAADMElEQVR42sVYv4saQRS+RZFrbLY7IY0WadzSJoggXJHKRlJuKx4kf0DstAkpbFPZpNcmgRQWEis5C5ukUMQUsbNXRDw2+8k8eY4zu6O7dxl4KPPjzbff++bNj5ub6MWS7MWLpbCEMOulAKomvxWWlozqVSBjBZNgAO58cwaDQWO1Wn1Zr9eDzWbzC4b/vn1dLpcfxuPxKwYuMigVkFyz2XyYzWZ/PMMCgPP5/G1UYDKYu2Kx+G4ymTzSRNvtdtfv971Go+G5rutVKpWD4T/q0Oazt+XABGMXg+JgjqyQc/y2220vn8972Ww20NAHfWnsbrf7K9i6CNQJmFqt9hlswCG+ulAohAKRDWMwlpiVQBmBQZhyCBN9XbfbvRiIbPBBoKbT6eswUEThrVhF9yTe4XAYGQwZMQVNibm0oSN27GQy+QahIs1cE6YgXS0Wiyf4DgodZyfnm0vsQJRxgSGDTxTkLR1LSnb8ZR6qB5W2gtrI4DuIJa6daq/X+43OnU5H65AXPjHG8KIbT/2Q6RlLZ4Ac346ZGEkujHYqmEAGExRu+FaE7UQ/aYTL//1ISz1MzDIoUzCUmygFiJx3DNuJfgCIEqFJNlaBMl0IVDC3EhByTyqV+rTf759MAclhCtMeN5onFJBpyFRgTEHhY1nI9IAQMhI1dm9TMCpRB4GCbyZqJaCjqGnZB2lBN7HpsscRReS6R1nUZ8veT4w/whIjTaxiIaiNDPsjCk6dApClAnTYNriO6vV67FsH5SChn5wuMZ7oqNVq/Yx7p5fZGY1G32T9qDbXQ9g4S3GcheR9Dr7FXGndEeSMpVKp1KUkCRFGBUNCRv7BsVjHju4IUgVLJPCoTBEzQuzfJe1YJudphwQOPRFTiP8lQkdf0gyYEWAc1VIPu3HYHBTCx681mAR5qlwun4FAHdoICGkG5yzh077k5qECVYWmZLZ4QZ2uXrBSvQaM9m4mhP5AwKAtZFnOGmcDbQCfyWTei7E5KUyRb6/EFpy7HBw31Ik2V/QlVmK541sKtmzxtY7Y++65iTpH9LEVrFjP8RzDn2FsyfizzLM8xwQ9ViU09l9e1awQu6r8A4hH+I8+sga+AAAAAElFTkSuQmCC)');
                close_button.style.setProperty('margin', '-' + (applyHeight + 17) + 'px 0 0 ' + (divContainer.offsetWidth - 17) + 'px');
                close_button.style.setProperty('cursor', 'pointer');
                close_button.style.setProperty('position', 'relative');
                close_button.style.setProperty('z-index', '9999');
                close_button.style.setProperty('opacity', '1');
                close_button.setAttribute("onclick", "window.postMessage('dynad-tv-protocol/close', '*');");

                divContainer.style.overflow = 'visible';
                // if(divContainer.hasAttribute('state_skip')){
                //    bc.style.display = divContainer.getAttribute('state_skip');
                // }

                divContainer.appendChild(close_button);
            }
        }

        function resize() {
            var avWidth = divContainer.parentNode.offsetWidth,
                avHeight = (document.documentElement.clientHeight * 0.6);

            if (typeof window.DYNAD_TV.config.container !== 'undefined' && typeof window.DYNAD_TV.config.container.width !== 'undefined')
                avWidth = window.DYNAD_TV.config.container.width;
            if (typeof window.DYNAD_TV.config.container !== 'undefined' && typeof window.DYNAD_TV.config.container.height !== 'undefined')
                avHeight = window.DYNAD_TV.config.container.height;

            if (Math.abs(width - avWidth) < Math.abs(height - avHeight) || width > avWidth) {
                var ratio = width / avWidth;
                vWidth = Math.round(width / ratio);
                vHeight = Math.round(height / ratio);
            } else {
                var ratio = height / avHeight;
                vWidth = Math.round(width / ratio);
                vHeight = Math.round(height / ratio);
            }
            if (vWidth > avWidth) {
                var ratio = vWidth / avWidth;
                vWidth = Math.round(vWidth / ratio);
                vHeight = Math.round(vHeight / ratio);
            }
            if (vHeight > avHeight) {
                var ratio = vHeight / avHeight;
                vWidth = Math.round(vWidth / ratio);
                vHeight = Math.round(vHeight / ratio);
            }

            if (isNaN(vWidth) || isNaN(vHeight)) {
                vWidth = avWidth;
                vHeight = avHeight;
            }

            container.contentWindow.postMessage('dynad-tv-protocol/resize/' + vWidth + '/' + vHeight, '*');
        }

        //
        // acompanha evento de scroll
        //
        function follow() {
            var disableViewPort = false;
            if (typeof window.DYNAD_TV.config.disabledViewport !== 'undefined')
                disableViewPort = window.DYNAD_TV.config.disabledViewport;

            if (disableViewPort === true || withinviewport(container, vHeight)) {
                if (status == STATUS.INITIALIZED) {} else if (status == STATUS.LOADED && document.hidden != true) {
                    status = STATUS.PLAYING;
                    sendPlayMessage();
                } else if (status == STATUS.PAUSED) {
                    status = STATUS.PLAYING;
                    sendPlayMessage();
                }
            } else {
                if (status == STATUS.PLAYING) {
                    status = STATUS.PAUSED;
                    sendPauseMessage();
                }
            }
        }

        function dispose() {
            if (window.addEventListener) {
                removeEventListener("scroll", follow);
                removeEventListener("touchstart", follow);
                removeEventListener("touchend", follow);
                removeEventListener("resize", resize);
                removeEventListener("focus", sendFocusMessage);
                removeEventListener("blur", sendBlurMessage);
            } else {
                detachEvent("onscroll", follow);
                detachEvent("ontouchstart", follow);
                detachEvent("ontouchend", follow);
                detachEvent("onresize", resize);
                detachEvent("onfocus", sendFocusMessage);
                detachEvent("onblur", sendBlurMessage);
            }
        }

        function sendStartCounterMessage() {
            container.contentWindow.postMessage('dynad-tv-protocol/start-counter', '*');
            try {
                dispatchEventListener('counting');
            } catch (exEvent) {}
        }
        
        function getUVTags () {
            try { 
                return ( typeof universal_variable.page.tags === 'object' && Array.isArray(universal_variable.page.tags) ? universal_variable.page.tags.toString() : "" );
            } catch ( e ) { return ""; }
        }

        function sendLoadMessage() {
            var params = '&videoplayertype=dynad_floating&keyword=video-auto-play&tags=' + getUVTags();
            if (typeof UOLPD !== 'undefined' && typeof UOLPD.dataLayer !== 'undefined') {
                try {
                    for (var key in UOLPD.dataLayer) {
                        params += '&' + key + '=' + UOLPD.dataLayer[key];
                    }
                } catch (exDL) {
                    if (typeof UOLPD.dataLayer.tt_age !== 'undefined') params += '&tt_age=' + UOLPD.dataLayer.tt_age;
                    if (typeof UOLPD.dataLayer.tt_cluster !== 'undefined') params += '&tt_cluster=' + UOLPD.dataLayer.tt_cluster;
                    if (typeof UOLPD.dataLayer.tt_customaudience !== 'undefined') params += '&tt_customaudience=' + UOLPD.dataLayer.tt_customaudience;
                    if (typeof UOLPD.dataLayer.tt_gender !== 'undefined') params += '&tt_gender=' + UOLPD.dataLayer.tt_gender;
                    if (typeof UOLPD.dataLayer.tt_lists !== 'undefined') params += '&tt_lists=' + UOLPD.dataLayer.tt_lists;
                    if (typeof UOLPD.dataLayer.tt_microsegments !== 'undefined') params += '&tt_microsegments=' + UOLPD.dataLayer.tt_microsegments;
                    if (typeof UOLPD.dataLayer.tt_socialclass !== 'undefined') params += '&tt_socialclass=' + UOLPD.dataLayer.tt_socialclass;
                    if (typeof UOLPD.dataLayer.tt_subjects !== 'undefined') params += '&tt_subjects=' + UOLPD.dataLayer.tt_subjects;
                    if (typeof UOLPD.dataLayer.tt_team !== 'undefined') params += '&tt_team=' + UOLPD.dataLayer.tt_team;
                }
            }

            if (params != '') {
                if (window.DYNAD_TV.config.URL_VAST.indexOf('&cust_params=') > -1) {
                    var temp = window.DYNAD_TV.config.URL_VAST.split('&cust_params=');
                    window.DYNAD_TV.config.URL_VAST = temp[0] + '&cust_params=' + encodeURIComponent(params.substr(1) + "&") + temp[1];
                } else
                    window.DYNAD_TV.config.URL_VAST += '&cust_params=' + encodeURIComponent(params.substr(1));
            }

            if (typeof window.DYNAD_TV.config.settings !== 'undefined') {
                var st = '';
                for (var x = 0; x < window.DYNAD_TV.config.settings.length; x++) {
                    st += (st != '' ? '/' : '') + window.DYNAD_TV.config.settings[x].key + '=' + window.DYNAD_TV.config.settings[x].value;
                }
                if (st != '')
                    container.contentWindow.postMessage('dynad-tv-protocol/settings/' + st, '*');
            }
            container.contentWindow.postMessage('dynad-tv-protocol/load/' + window.DYNAD_TV.config.URL_VAST, '*');
            if (console && console.log)
                console.log('[dynad-core] - [', Date.now(), '] - message (LOAD) delivered to player.');            
        }

        function sendFocusMessage() {
            if (status == STATUS.PLAYING && typeof container !== 'undefined' && typeof container.contentWindow !== 'undefined')
                container.contentWindow.postMessage('dynad-tv-protocol/win-focus', '*');
        }

        function sendBlurMessage() {
            console.log('will dispatch blur:', status);
            if (status == STATUS.PLAYING && typeof container !== 'undefined' && typeof container.contentWindow !== 'undefined')
                container.contentWindow.postMessage('dynad-tv-protocol/win-blur', '*');
        }

        function sendPlayMessage() {
            container.contentWindow.postMessage('dynad-tv-protocol/play', '*');
            if (console && console.log)
                console.log('[dynad-core] - [', Date.now(), '] - message (PLAY) delivered to player.');            
        }

        function sendPauseMessage() {
            container.contentWindow.postMessage('dynad-tv-protocol/pause', '*');
        }

        var hidden, visibilityChange;
        try {
            if (typeof document.hidden !== "undefined") {
                hidden = "hidden";
                visibilityChange = "visibilitychange";
            } else if (typeof document.mozHidden !== "undefined") {
                hidden = "mozHidden";
                visibilityChange = "mozvisibilitychange";
            } else if (typeof document.msHidden !== "undefined") {
                hidden = "msHidden";
                visibilityChange = "msvisibilitychange";
            } else if (typeof document.webkitHidden !== "undefined") {
                hidden = "webkitHidden";
                visibilityChange = "webkitvisibilitychange";
            }
        } catch (e) {}

        var idTimerBlur = null;
        if (window.addEventListener) {
            addEventListener("scroll", follow, false);
            addEventListener("touchstart", follow, false);
            addEventListener("touchend", follow, false);
            addEventListener("resize", resize, false);
            addEventListener("message", handle, false);
            
            document.addEventListener(visibilityChange, function() {
                if (document[hidden]) {
                    sendBlurMessage();
                } else {
 
                    sendFocusMessage();
                }
            });
            
            addEventListener("focus", function () {                
                sendFocusMessage();
                if( idTimerBlur != null ) { clearTimeout(idTimerBlur); idTimerBlur = null; }
            }, false);
            
            addEventListener("blur", function() {                
                if( idTimerBlur != null ) { clearTimeout(idTimerBlur); idTimerBlur = null; }
                idTimerBlur = setTimeout( function () {
                    if ( isMouseOverIfrm === false ) {
                        if ( !(document.activeElement instanceof HTMLIFrameElement) || (document.activeElement instanceof HTMLIFrameElement && document.activeElement.id != container.id) ) {
                            sendBlurMessage();
                        }
                    }
                }, 5);
            }, false);

            container.addEventListener("mouseenter", function(e) {
                isMouseOverIfrm = true;
            }, false);
            container.addEventListener("mouseleave", function(e) {
                isMouseOverIfrm = false;
            }, false);
        } else {
            attachEvent("onscroll", follow);
            attachEvent("ontouchstart", follow, false);
            attachEvent("ontouchend", follow, false);
            attachEvent("onresize", resize, false);
            attachEvent("onmessage", handle);
            
            document.attachEvent('on' + visibilityChange, function() {
                if (document[hidden]) {
                    sendBlurMessage();
                } else {
 
                    sendFocusMessage();
                }
            });
            
            attachEvent("onfocus", function () {                
                sendFocusMessage();
                if( idTimerBlur != null ) { clearTimeout(idTimerBlur); idTimerBlur = null; }
            }, false);
            
            attachEvent("onblur", function() {
                if( idTimerBlur != null ) { clearTimeout(idTimerBlur); idTimerBlur = null; }
                idTimerBlur = setTimeout( function () {
                    if ( isMouseOverIfrm === false ) {
                        if ( !(document.activeElement instanceof HTMLIFrameElement) || (document.activeElement instanceof HTMLIFrameElement && document.activeElement.id != container.id) ) {
                            sendBlurMessage();
                        }
                    }
                }, 5);
            }, false);
            
            container.attachEvent("onmouseenter", function(e) {
                isMouseOverIfrm = true;
            }, false);
            
            container.attachEvent("onmouseleave", function(e) {
                isMouseOverIfrm = false;
            }, false);
        }

        follow();
        idTimeout = setTimeout(function() {
            //change status for timeout
            status = STATUS.TIMEOUT;
            setTimeout(function() {
                //remove container
                try {
                    divContainer.parentNode.removeChild(divContainer);
                } catch (e) {}
            }, 1000);
            //dispatch nodata event
            dispatchEventListener('nodata', 'timeout operation');
            //dispose listeners
            dispose();
            //add event counter
            addAdServerCounter(5550001578);
        }, window.DYNAD_TV.config.timeout || 20000);
    }

    var divContainer = document.getElementById(containerId),
        ifrm = document.getElementById(reqid.replace('I', 'IF'));
    try {
        try {
            divContainer.style.width = '0%';
            ifrm.style.width = '100%';
            ifrm.width = '100%';

            divContainer.style.height = '0px';
            ifrm.style.height = '0px';
            ifrm.height = 0;
            
            if( document.querySelector('.mod-hibrido-superfoto') ) {  
                window.DYNAD_TV.config.container.height = document.querySelector('.mod-hibrido-superfoto').offsetHeight;
                window.DYNAD_TV.config.container.width =  Math.round ( window.DYNAD_TV.config.container.height * 1.5625 );

                divContainer.style.position = "absolute";
                divContainer.style.top = 0;
                divContainer.style.marginLeft =  "-" + (window.DYNAD_TV.config.container.width/2) + "px";
            }
        } catch (e) {
            return false;
        }
        DynAdTvKeeper(ifrm);
    } catch (e) {
        return false;
    }

}

try { 
    //implementacao para alimentar CA11444 (UOL Ads)
    if( step == 2 ) {
        if( UOLPD.dataLayer.tt_customaudience.indexOf('CA11444') > -1 ) {
            setTimeout(function() {
                (new Image()).src = "https://trg.adilligo.com/udt/dmp/cs?ord="+Date.now()+"&source_id=b52988f890a740affe7cbad17c28bf907f06db99d04bfdc608047adb65d41cc5&incSegments=CA11444";
            }, 1000);    
        }
    }
} catch ( exCA11444 ) { }

return true;}catch(e){if(typeof console!=='undefined'&&typeof console.log!=='undefined'){console.log('DynAd Error:');console.log(e);}}})('I5550001461_15507608029671284455760', 'H', 1,'_dynad_c_I5550001461_15507608029671284455760','5550001461');if(_rp15507608029671284455760==true||typeof _rp15507608029671284455760==='undefined'){divAppender("<iframe id='IF5550001461_15507608029671284455760' name='I5550001461_15507608029671284455760' src='https://s.dynad.net/stack/805NaYckyA22nuEkGItEw-3EFJvLUHPy5avCGIO4a23DVKbQ_tcj7XAQPsWhT1lh.html' style='border:0; visibility:visible; width:100%; height:0px; ' marginwidth='0' marginwidth='0' width='88' height='31' marginheight='0' align='top' scrolling='No' bordercolor='#000000' frameborder='0' hspace='0' vspace='0'></iframe>");(function(){var theIframe=document.getElementById('IF5550001461_15507608029671284455760');var dyndata=(function(){var t=dt_dynad;if(typeof t==="object")return JSON.stringify(t);else if(typeof t==="undefined"||t==null||t=="")return"{}";else return (function(e){var t=function(e){var t="";for(var n=e.length-1;n>=0;n--)if(e[n]>="0"&&e[n]<="9")t+=e[n];else break;return[e.substring(0,n+1),t]};var n=e.replace(/"/g,"'").split(/&(?!([#a-z0-9]{1,4})(;))/gi);var r="";var i="";var s="";for(var o=0;o<n.length;o++){if(typeof n[o]==="undefined")continue;var u=n[o].split("=");if(u[0]=="_nofobjs"||u[0]=="_dyn_hash_"||u.length!=2)continue;var a=t(u[0]);if(a[1]!=r&&i!=""){s+=(s==""?"":",")+"{"+i+"}";i=""}if(a[0]!=""){r=a[1];i+=(i==""?"":",")+'"'+a[0]+'":"'+decodeURIComponent(u[1])+'"'}}s+=(s==""?"":",")+"{"+i+"}";return"["+s+"]"})(t.toString())})();var data='{"target":"_blank","clickTAG":"https://t.dynad.net/c/?dc=5550001461;ct=1;ci=5000002952;cr=4000036714.0;cb=4000020066.0;ord=0;tid=TB-FE6;bid=;;","clickTAG2":"https://t.dynad.net/c/?dc=5550001461;ct=2;ci=5000002952;cr=4000036714.0;cb=4000020066.0;ord=0;tid=TB-FE6;bid=;;","clickTAG3":"https://t.dynad.net/c/?dc=5550001461;ct=3;ci=5000002952;cr=4000036714.0;cb=4000020066.0;ord=0;tid=TB-FE6;bid=;;","clickTAG4":"https://t.dynad.net/c/?dc=5550001461;ct=4;ci=5000002952;cr=4000036714.0;cb=4000020066.0;ord=0;tid=TB-FE6;bid=;;","clickTAG5":"https://t.dynad.net/c/?dc=5550001461;ct=5;ci=5000002952;cr=4000036714.0;cb=4000020066.0;ord=0;tid=TB-FE6;bid=;;","_d_site_id":"3000000127","_d_placement_id":"5550001461","_d_campaign_id":"5000002952","_d_creative_id":"4000036714","eventsMap":{},"domain":"https://t.dynad.net","tagParameters":'+JSON.stringify(tagParameters)+',"data":'+dyndata+'}';if(window.addEventListener){
theIframe.addEventListener('load',function(){theIframe.contentWindow.postMessage(JSON.stringify((function(dynamicData){return dynamicData;})(JSON.parse(data))),'https://s.dynad.net')});}else{theIframe.attachEvent('onload', function(){theIframe.contentWindow.postMessage(JSON.stringify((function(dynamicData){return dynamicData;})(JSON.parse(data))),'https://s.dynad.net')});}window._dd_st_vl_15507608029671284455760=JSON.parse(data);})();(function(reqid,type,step,containerId,placementId,siteId,campaignId,creativeId,dynamicData){try{if (step == 1) {
    ! function(e, t, o) {
        "function" == typeof define && define.amd ? define([], o) : "undefined" != typeof module && "object" == typeof exports ? module.exports = o() : e[t] = o()
    }(this, "withinviewport", function() {
        //
        // retorna as dimensoes do iframe e a posicao relativa ao viewport
        //
        var e = void 0 !== window.innerHeight,
            t = function o(t, n) {
                var i, d, r, a = !1,
                    f = {},
                    p = {};
                return i = "string" == typeof n ? {
                    sides: n
                } : n || {}, p.container = i.container || f.container || o.defaults.container || window, p.sides = i.sides || f.sides || o.defaults.sides || "all", p.top = i.top || f.top || o.defaults.top || 0, p.right = i.right || f.right || o.defaults.right || 0, p.bottom = i.bottom || f.bottom || o.defaults.bottom || 0, p.left = i.left || f.left || o.defaults.left || 0, (p.container === document.body || 1 === !p.container.nodeType) && (p.container = window), d = {
                    e: function() {
                        var t;
                        if (t = e || p.container !== window ? p.container.innerHeight : document.documentElement.clientHeight, "undefined" != typeof window.expanded) return r.top > -(n / 2) && r.bottom < t + (n / 2);
                        var o = r.top > 0 && r.top < t - (n / 2);
                        return o && "undefined" == typeof window.expanded && (window.expanded = !0), o
                    }
                }, r = t.getBoundingClientRect(), a = d.e() ? !0 : !1
            };
        return t.prototype.defaults = {
            container: document.body,
            sides: "all",
            top: 0,
            right: 0,
            bottom: 0,
            left: 0
        }, t.defaults = t.prototype.defaults, t
    });
}

if (step == 2) {
    if (typeof window.DYNAD_TV === 'undefined')
        window.DYNAD_TV = {
            'config': {
                'URL_VAST': 'https://pubads.g.doubleclick.net/gampad/ads?slotname=/8804/teste/inread&sz=640x480&ciu_szs=&url=%5Breferrer_url%5D&unviewed_position_start=1&output=xml_vast3&impl=s&env=vp&gdfp_req=1&ad_rule=0&video_url_to_fetch=%5Bdescription_url%5D&vad_type=linear&vpos=preroll&pod=1&min_ad_duration=0&max_ad_duration=999999000&ppos=1&lip=true&correlator=' + new Date().getTime() + Math.random()
            }
        };

    function DynAdTvKeeper(container) {
        var idTimeout = null;
        var STATUS = {
            INITIALIZED: 0,
            LOADED: 1,
            PLAYING: 2,
            PAUSED: 3,
            CLOSED: 5,
            TIMEOUT: 4
        };

        var status = STATUS.INITIALIZED,
            height = 0,
            width = 0,
            vHeight = 0,
            vWidth = 0,
            isMouseOverIfrm = false,
            addMarginOnTop = 0,
            shadowBox = null,
            comScoreStreamingTag = null,
            comScoreStreamingTagID = null,
            adVideoDuration = 30000;

        var idAdSystem = "",
            idCreativeId = "",
            idAdId = "";

        function comScorePauseVideoAdvertisement() {
            try {
                if (comScoreStreamingTagID != null) {
                    comScoreStreamingTag = new Image();
                    comScoreStreamingTag.setAttribute('src', 'https://sb.scorecardresearch.com/p?c1=2&c2=27893134&ns_ap_sv=2.1511.10&ns_type=hidden&ns_st_it=a&ns_st_sv=4.0.0&ns_st_ad=1&ns_st_sq=1&ns_st_id=' + comScoreStreamingTagID + '&ns_st_ec=2&ns_st_cn=1&ns_st_ev=end&ns_st_ct=va11&ns_st_cl=' + adVideoDuration + '&ns_st_pt=' + adVideoDuration + '&c3=UOLADNET&c4=*null&c6=*null&ns_ts=' + Date.now());
                    if (console && console.log)
                        console.log("[dynad-tv] - called method stop at comScore streaming tag.");
                }
            } catch (exInitComScore) {
                if (console && console.error)
                    console.error("[dynad-tv] - failed to dispatch pause comScore streaming tag.", exInitComScore);
            }
        }

        function comScorePlayVideoAdvertisement() {
            try {
                if (comScoreStreamingTagID == null)
                    comScoreStreamingTagID = Date.now();
                comScoreStreamingTag = new Image();
                comScoreStreamingTag.setAttribute('src', 'https://sb.scorecardresearch.com/p?c1=2&c2=27893134&ns_ap_sv=2.1511.10&ns_type=hidden&ns_st_it=a&ns_st_sv=4.0.0&ns_st_ad=1&ns_st_sq=1&ns_st_id=' + comScoreStreamingTagID + '&ns_st_ec=1&ns_st_cn=1&ns_st_ev=play&ns_st_ct=va11&ns_st_cl=' + adVideoDuration + '&ns_st_pt=0&c3=UOLADNET&c4=*null&c6=*null&ns_ts=' + Date.now());
                if (console && console.log)
                    console.log("[dynad-tv] - called method play at comScore streaming tag.");
            } catch (exInitComScore) {
                comScoreStreamingTagID = null;
                if (console && console.error)
                    console.error("[dynad-tv] - failed to dispatch play comScore streaming tag.", exInitComScore);
            }
        }


        function addAdServerCounter(id) {
            var ic = document.createElement('img');
            ic.setAttribute('src', "https://t.dynad.net/pc/?dc=" + id + ";ord=" + Date.now());
            ic.setAttribute('style', 'width: 0px; height: 0px; visibility: hidden; position: absolute; z-index: 0;');
            divContainer.appendChild(ic);
        }

        function dispatchEventListener(eventName, eventData) {
            if (console && console.log)
                console.log('[dynad-core] - [', Date.now(), '] - [event: ', eventName, '] - [data: ', eventData, ']');
                
            if (status === STATUS.CLOSED)
                return;
            if (typeof window.DYNAD_TV !== 'undefined' && typeof window.DYNAD_TV.eventListener !== 'undefined') {
                if (typeof eventData !== 'undefined')
                    window.DYNAD_TV.eventListener(eventName, eventData);
                else
                    window.DYNAD_TV.eventListener(eventName);
            }
            if (eventName == 'closed' || eventName == 'nodata')
                status = STATUS.CLOSED;
        }

        function notifyMetricsMonitor() {
            try {
                if (Math.random() < 0.05) {
                    var script = document.createElement('script');
                    script.setAttribute('async', 'true');
                    script.setAttribute('type', 'text/javascript');
                    var foreignKeys = ['key1', 'key2'].toString();
                    window['callback'] = function(result) {};
                    script.setAttribute('src', '//metrics.dynad.net/resources/counter/jsonp/incWithFk/dynadtv/monitor/delivery/' + placementId + '?ord=' + Date.now() + '&callback=callback');
                    (document.head || document.getElementsByTagName("head")[0] || document.body || document.documentElement || document.getElementsByTagName('body')[0]).appendChild(script);
                }
            } catch (e) {
                if (console && console.error)
                    console.error('failed to append metrics monitoring pixel', e);
            }
        }

        function handle(e) {
            if (typeof e.data === 'undefined' || e.data == null)
                return;

            if (typeof e.data != 'string')
                return;

            if (e.data.indexOf('dynad-tv') == -1 || status == STATUS.TIMEOUT || status == STATUS.CLOSED)
                return;

            if (console && console.log)
                console.log('[dynad-core] - [', Date.now(), '] - ', e.data);

            if (e.data.indexOf('dynad-tv-protocol/loaded/') == 0) { // player foi carregado
                try {
                    if (idTimeout != null) {
                        clearTimeout(idTimeout);
                        idTimeout = null;
                    }
                } catch (e) {}

                status = STATUS.LOADED;
                if (typeof window.DYNAD_TV.config.container !== 'undefined' && typeof window.DYNAD_TV.config.container.width !== 'undefined') {
                    width = window.DYNAD_TV.config.container.width;
                    height = window.DYNAD_TV.config.container.height;
                } else {
                    var dm = e.data.substr('dynad-tv-protocol/loaded/'.length).split('/');
                    height = parseInt(dm[1]);
                    width = parseInt(dm[0]);

                    try {
                        if (height <= 0 || width <= 0) {
                            width = divContainer.parentNode.offsetWidth;
                            height = Math.floor((9 / 16) * width);
                        }
                    } catch (e) {}
                }

                try {
                    dispatchEventListener('loaded', {
                        'w': width,
                        'h': height
                    });
                } catch (exEvent) {}
                resize();
                follow();
                notifyMetricsMonitor();
            } else if (e.data.indexOf('dynad-tv-protocol/click/') == 0) { // player nao contem data
                try {
                    if (idTimeout != null) {
                        clearTimeout(idTimeout);
                        idTimeout = null;
                    }
                } catch (e) {}
                try {
                    dispatchEventListener('click');
                } catch (exEvent) {}
                addAdServerCounter(5550001579);
            } else if (e.data == 'dynad-tv-protocol/user_close') {
                container.contentWindow.postMessage('dynad-tv-protocol/force_close_linear', '*');
                window['callbackiruol_user_close'] = function(d) {};
                var e = document.createElement('script');
                e.setAttribute('type', 'text/javascript');
                e.setAttribute('async', 'true');
                e.setAttribute('src', '//metrics.dynad.net/resources/counter/jsonp/multipleIncWithFk/dynadtv/behavior/close_button_floating/override/?callback=callbackiruol_user_close&ord=' + Date.now() + '&override_0=' + encodeURIComponent(idAdSystem + '/' + idAdId + '/' + idCreativeId));
                divContainer.appendChild(e);
            } else if (e.data.indexOf('dynad-tv-protocol/impression_data/') == 0) {
                var op = e.data.substr(('dynad-tv-protocol/impression_data/').length).split('/');
                idAdSystem = op[1], idCreativeId = op[0], idAdId = op[2];
                try {
                    if (op.length > 3) {
                        adVideoDuration = Number(op[3]) * 1000;
                        if (adVideoDuration < 15000)
                            adVideoDuration = 15000
                    }
                } catch (exTimer) {}
            } else if (e.data.indexOf('dynad-tv-protocol/state_skip/') == 0) {
                var op = e.data.substr(('dynad-tv-protocol/state_skip/').length);
                divContainer.setAttribute('state_skip', (op == 'true' ? 'none' : 'block'));
                //var btCloseEle = document.getElementById('floater_bt_close_dynadtv_unique');
                //if( btCloseEle )
                //    btCloseEle.style.display = divContainer.getAttribute('state_skip');                       
                //document.getElementById('floater_bt_close_dynadtv').style.display = (op == 'true' ? 'none' : 'block');****/
            } else if (e.data.indexOf('dynad-tv-protocol/no_data/') == 0) { // player nao contem data
                try {
                    if (idTimeout != null) {
                        clearTimeout(idTimeout);
                        idTimeout = null;
                    }
                } catch (e) {}
                var m = e.data.substr('dynad-tv-protocol/no_data/'.length).split('/');
                try {
                    dispatchEventListener('nodata', m);
                } catch (exEvent) {}
                addAdServerCounter(5550001577);
                notifyMetricsMonitor();
            } else if (e.data == 'dynad-tv-protocol/close') {
                try {
                    dispatchEventListener('closed');
                } catch (exEvent) {}

                try {
                    if (idTimeout != null) {
                        clearTimeout(idTimeout);
                        idTimeout = null;
                    }
                } catch (e) {}

                if (shadowBox != null) {
                    divContainer.style.border = "0px";
                }
                divContainer.style.overflow = "hidden";

                divContainer.style.height = '0px';
                divContainer.style.width = '0%';
                divContainer.height = '0px';

                if (shadowBox != null)
                    shadowBox.parentNode.removeChild(shadowBox);

                setTimeout(function() {
                    container.parentNode.removeChild(container);
                    /***if( typeof window.DYNAD_TV.config.container !== 'undefined' && typeof window.DYNAD_TV.config.container.removeOnClose !== 'undefined' ) {
                        if( window.DYNAD_TV.config.container.removeOnClose === true )
                            window.DYNAD_TV.config.container.obj.parentNode.removeChild(window.DYNAD_TV.config.container.obj);
                    }***/
                }, 1000);

                dispose();
                comScorePauseVideoAdvertisement();
            } else if (e.data == 'dynad-tv-protocol/init') {
                if (document.hasFocus() === true) {
                    sendLoadMessage();
                } else {
                    try {
                    dispatchEventListener('nodata');
                    } catch (exEvent) {}

                    try {
                        if (idTimeout != null) {
                            clearTimeout(idTimeout);
                            idTimeout = null;
                        }
                    } catch (e) {}

                    if (shadowBox != null) {
                        divContainer.style.border = "0px";
                    }
                    divContainer.style.overflow = "hidden";

                    divContainer.style.height = '0px';
                    divContainer.style.width = '0%';
                    divContainer.height = '0px';

                    if (shadowBox != null)
                        shadowBox.parentNode.removeChild(shadowBox);

                    setTimeout(function() {
                        container.parentNode.removeChild(container);
                    }, 1000);

                    dispose();
                }
            } else if (e.data == 'dynad-tv-protocol/expand') {
                if (typeof window.DYNAD_TV.config.container !== 'undefined' && typeof window.DYNAD_TV.config.container.obj !== 'undefined') {
                
                    if( window.DYNAD_TV.config.container.obj.getAttribute('id') == 'dynad-tv-floater' )
                        window.DYNAD_TV.config.container.obj.style.position = 'absolute';
                    else
                        window.DYNAD_TV.config.container.obj.style.position = 'relative';
                        
                    if (window['dynad_skip_overflow_visible'] != true)
                        window.DYNAD_TV.config.container.obj.style.overflow = 'visible';
                }

                if (typeof window.DYNAD_TV.config.container !== 'undefined' && typeof window.DYNAD_TV.config.container.width !== 'undefined')
                    divContainer.style.width = window.DYNAD_TV.config.container.width + "px";
                else
                    divContainer.style.width = '100%';

                if (typeof window.DYNAD_TV.config.settings !== 'undefined' && window.DYNAD_TV.config.settings['enableShadow'] === 'true') {
                    if (typeof window.DYNAD_TV.config.container !== 'undefined' && typeof window.DYNAD_TV.config.container.obj !== 'undefined') {
                        divContainer.style.display = 'none';
                        var pcW = window.DYNAD_TV.config.container.obj.offsetWidth;
                        var mcW = window.DYNAD_TV.config.container.width;
                        if (pcW > mcW)
                            divContainer.style.marginLeft = Math.round((pcW - mcW) / 2) + "px";
                        divContainer.style.display = 'block';

                        var pcH = window.DYNAD_TV.config.container.obj.offsetHeight;
                        var mcH = window.DYNAD_TV.config.container.height;
                        if (pcH > mcH)
                            divContainer.style.marginTop = Math.round((pcH - mcH) / 2) + "px";

                        shadowBox = document.createElement('div');
                        shadowBox.setAttribute('style', 'position: absolute; top: 0px; left: 0px; width: ' + pcW + "px; height: " + pcH + "px; background:rgba(1,1,1,0.7); z-index: 2999998;");
                        window.DYNAD_TV.config.container.obj.appendChild(shadowBox);
                        divContainer.style.border = "1px solid white";
                        divContainer.style.overflow = "visible";
                    }
                }

                var applyHeight = (vHeight + addMarginOnTop);
                if (typeof window.DYNAD_TV.config.container !== 'undefined' && typeof window.DYNAD_TV.config.container.height !== 'undefined')
                    applyHeight = window.DYNAD_TV.config.container.height;
                else {

                }

                container.style.height = applyHeight + 'px';
                container.height = applyHeight + 'px';

                // Animação desligada em 21/03/2018 para testes de agilidade
                // divContainer.style.animationDuration = "1s";
                // divContainer.style.WebkitTransitionDuration = "1s";
                // divContainer.style.WebkitTransition = "1s";
                // divContainer.style.MozTransition = "1s";


                divContainer.style.height = applyHeight + 'px';
                divContainer.height = applyHeight + 'px';
                sendStartCounterMessage();
                try {
                    dispatchEventListener('expanded', {
                        'w': vWidth,
                        'h': applyHeight
                    });
                } catch (exEvent) {}
                addAdServerCounter(5550001580);
                comScorePlayVideoAdvertisement();

                var hasShadowBeingEnabled = false;
                try {
                    hasShadowBeingEnabled = window.DYNAD_TV.config.settings['enableShadow'] == 'true';
                } catch (e) {}

                var fontColor = "black";
                if (hasShadowBeingEnabled)
                    fontColor = "white";

                var close_button = document.createElement('div');
                close_button.style.setProperty('width', '34px');
                close_button.style.setProperty('height', '34px');
                close_button.style.setProperty('background-position', 'center');
                close_button.style.setProperty('background-repeat', 'no-repeat');
                close_button.style.setProperty('background-size', '24px');
                close_button.style.setProperty('background-image', 'url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAADMElEQVR42sVYv4saQRS+RZFrbLY7IY0WadzSJoggXJHKRlJuKx4kf0DstAkpbFPZpNcmgRQWEis5C5ukUMQUsbNXRDw2+8k8eY4zu6O7dxl4KPPjzbff++bNj5ub6MWS7MWLpbCEMOulAKomvxWWlozqVSBjBZNgAO58cwaDQWO1Wn1Zr9eDzWbzC4b/vn1dLpcfxuPxKwYuMigVkFyz2XyYzWZ/PMMCgPP5/G1UYDKYu2Kx+G4ymTzSRNvtdtfv971Go+G5rutVKpWD4T/q0Oazt+XABGMXg+JgjqyQc/y2220vn8972Ww20NAHfWnsbrf7K9i6CNQJmFqt9hlswCG+ulAohAKRDWMwlpiVQBmBQZhyCBN9XbfbvRiIbPBBoKbT6eswUEThrVhF9yTe4XAYGQwZMQVNibm0oSN27GQy+QahIs1cE6YgXS0Wiyf4DgodZyfnm0vsQJRxgSGDTxTkLR1LSnb8ZR6qB5W2gtrI4DuIJa6daq/X+43OnU5H65AXPjHG8KIbT/2Q6RlLZ4Ac346ZGEkujHYqmEAGExRu+FaE7UQ/aYTL//1ISz1MzDIoUzCUmygFiJx3DNuJfgCIEqFJNlaBMl0IVDC3EhByTyqV+rTf759MAclhCtMeN5onFJBpyFRgTEHhY1nI9IAQMhI1dm9TMCpRB4GCbyZqJaCjqGnZB2lBN7HpsscRReS6R1nUZ8veT4w/whIjTaxiIaiNDPsjCk6dApClAnTYNriO6vV67FsH5SChn5wuMZ7oqNVq/Yx7p5fZGY1G32T9qDbXQ9g4S3GcheR9Dr7FXGndEeSMpVKp1KUkCRFGBUNCRv7BsVjHju4IUgVLJPCoTBEzQuzfJe1YJudphwQOPRFTiP8lQkdf0gyYEWAc1VIPu3HYHBTCx681mAR5qlwun4FAHdoICGkG5yzh077k5qECVYWmZLZ4QZ2uXrBSvQaM9m4mhP5AwKAtZFnOGmcDbQCfyWTei7E5KUyRb6/EFpy7HBw31Ik2V/QlVmK541sKtmzxtY7Y++65iTpH9LEVrFjP8RzDn2FsyfizzLM8xwQ9ViU09l9e1awQu6r8A4hH+I8+sga+AAAAAElFTkSuQmCC)');
                close_button.style.setProperty('margin', '-' + (applyHeight + 17) + 'px 0 0 ' + (divContainer.offsetWidth - 17) + 'px');
                close_button.style.setProperty('cursor', 'pointer');
                close_button.style.setProperty('position', 'relative');
                close_button.style.setProperty('z-index', '9999');
                close_button.style.setProperty('opacity', '1');
                close_button.setAttribute("onclick", "window.postMessage('dynad-tv-protocol/close', '*');");

                divContainer.style.overflow = 'visible';
                // if(divContainer.hasAttribute('state_skip')){
                //    bc.style.display = divContainer.getAttribute('state_skip');
                // }

                divContainer.appendChild(close_button);
            }
        }

        function resize() {
            var avWidth = divContainer.parentNode.offsetWidth,
                avHeight = (document.documentElement.clientHeight * 0.6);

            if (typeof window.DYNAD_TV.config.container !== 'undefined' && typeof window.DYNAD_TV.config.container.width !== 'undefined')
                avWidth = window.DYNAD_TV.config.container.width;
            if (typeof window.DYNAD_TV.config.container !== 'undefined' && typeof window.DYNAD_TV.config.container.height !== 'undefined')
                avHeight = window.DYNAD_TV.config.container.height;

            if (Math.abs(width - avWidth) < Math.abs(height - avHeight) || width > avWidth) {
                var ratio = width / avWidth;
                vWidth = Math.round(width / ratio);
                vHeight = Math.round(height / ratio);
            } else {
                var ratio = height / avHeight;
                vWidth = Math.round(width / ratio);
                vHeight = Math.round(height / ratio);
            }
            if (vWidth > avWidth) {
                var ratio = vWidth / avWidth;
                vWidth = Math.round(vWidth / ratio);
                vHeight = Math.round(vHeight / ratio);
            }
            if (vHeight > avHeight) {
                var ratio = vHeight / avHeight;
                vWidth = Math.round(vWidth / ratio);
                vHeight = Math.round(vHeight / ratio);
            }

            if (isNaN(vWidth) || isNaN(vHeight)) {
                vWidth = avWidth;
                vHeight = avHeight;
            }

            container.contentWindow.postMessage('dynad-tv-protocol/resize/' + vWidth + '/' + vHeight, '*');
        }

        //
        // acompanha evento de scroll
        //
        function follow() {
            var disableViewPort = false;
            if (typeof window.DYNAD_TV.config.disabledViewport !== 'undefined')
                disableViewPort = window.DYNAD_TV.config.disabledViewport;

            if (disableViewPort === true || withinviewport(container, vHeight)) {
                if (status == STATUS.INITIALIZED) {} else if (status == STATUS.LOADED && document.hidden != true) {
                    status = STATUS.PLAYING;
                    sendPlayMessage();
                } else if (status == STATUS.PAUSED) {
                    status = STATUS.PLAYING;
                    sendPlayMessage();
                }
            } else {
                if (status == STATUS.PLAYING) {
                    status = STATUS.PAUSED;
                    sendPauseMessage();
                }
            }
        }

        function dispose() {
            if (window.addEventListener) {
                removeEventListener("scroll", follow);
                removeEventListener("touchstart", follow);
                removeEventListener("touchend", follow);
                removeEventListener("resize", resize);
                removeEventListener("focus", sendFocusMessage);
                removeEventListener("blur", sendBlurMessage);
            } else {
                detachEvent("onscroll", follow);
                detachEvent("ontouchstart", follow);
                detachEvent("ontouchend", follow);
                detachEvent("onresize", resize);
                detachEvent("onfocus", sendFocusMessage);
                detachEvent("onblur", sendBlurMessage);
            }
        }

        function sendStartCounterMessage() {
            container.contentWindow.postMessage('dynad-tv-protocol/start-counter', '*');
            try {
                dispatchEventListener('counting');
            } catch (exEvent) {}
        }
        
        function getUVTags () {
            try { 
                return ( typeof universal_variable.page.tags === 'object' && Array.isArray(universal_variable.page.tags) ? universal_variable.page.tags.toString() : "" );
            } catch ( e ) { return ""; }
        }

        function sendLoadMessage() {
            var params = '&videoplayertype=dynad_floating&keyword=video-auto-play&tags=' + getUVTags();
            if (typeof UOLPD !== 'undefined' && typeof UOLPD.dataLayer !== 'undefined') {
                try {
                    for (var key in UOLPD.dataLayer) {
                        params += '&' + key + '=' + UOLPD.dataLayer[key];
                    }
                } catch (exDL) {
                    if (typeof UOLPD.dataLayer.tt_age !== 'undefined') params += '&tt_age=' + UOLPD.dataLayer.tt_age;
                    if (typeof UOLPD.dataLayer.tt_cluster !== 'undefined') params += '&tt_cluster=' + UOLPD.dataLayer.tt_cluster;
                    if (typeof UOLPD.dataLayer.tt_customaudience !== 'undefined') params += '&tt_customaudience=' + UOLPD.dataLayer.tt_customaudience;
                    if (typeof UOLPD.dataLayer.tt_gender !== 'undefined') params += '&tt_gender=' + UOLPD.dataLayer.tt_gender;
                    if (typeof UOLPD.dataLayer.tt_lists !== 'undefined') params += '&tt_lists=' + UOLPD.dataLayer.tt_lists;
                    if (typeof UOLPD.dataLayer.tt_microsegments !== 'undefined') params += '&tt_microsegments=' + UOLPD.dataLayer.tt_microsegments;
                    if (typeof UOLPD.dataLayer.tt_socialclass !== 'undefined') params += '&tt_socialclass=' + UOLPD.dataLayer.tt_socialclass;
                    if (typeof UOLPD.dataLayer.tt_subjects !== 'undefined') params += '&tt_subjects=' + UOLPD.dataLayer.tt_subjects;
                    if (typeof UOLPD.dataLayer.tt_team !== 'undefined') params += '&tt_team=' + UOLPD.dataLayer.tt_team;
                }
            }

            if (params != '') {
                if (window.DYNAD_TV.config.URL_VAST.indexOf('&cust_params=') > -1) {
                    var temp = window.DYNAD_TV.config.URL_VAST.split('&cust_params=');
                    window.DYNAD_TV.config.URL_VAST = temp[0] + '&cust_params=' + encodeURIComponent(params.substr(1) + "&") + temp[1];
                } else
                    window.DYNAD_TV.config.URL_VAST += '&cust_params=' + encodeURIComponent(params.substr(1));
            }

            if (typeof window.DYNAD_TV.config.settings !== 'undefined') {
                var st = '';
                for (var x = 0; x < window.DYNAD_TV.config.settings.length; x++) {
                    st += (st != '' ? '/' : '') + window.DYNAD_TV.config.settings[x].key + '=' + window.DYNAD_TV.config.settings[x].value;
                }
                if (st != '')
                    container.contentWindow.postMessage('dynad-tv-protocol/settings/' + st, '*');
            }
            container.contentWindow.postMessage('dynad-tv-protocol/load/' + window.DYNAD_TV.config.URL_VAST, '*');
            if (console && console.log)
                console.log('[dynad-core] - [', Date.now(), '] - message (LOAD) delivered to player.');            
        }

        function sendFocusMessage() {
            if (status == STATUS.PLAYING && typeof container !== 'undefined' && typeof container.contentWindow !== 'undefined')
                container.contentWindow.postMessage('dynad-tv-protocol/win-focus', '*');
        }

        function sendBlurMessage() {
            console.log('will dispatch blur:', status);
            if (status == STATUS.PLAYING && typeof container !== 'undefined' && typeof container.contentWindow !== 'undefined')
                container.contentWindow.postMessage('dynad-tv-protocol/win-blur', '*');
        }

        function sendPlayMessage() {
            container.contentWindow.postMessage('dynad-tv-protocol/play', '*');
            if (console && console.log)
                console.log('[dynad-core] - [', Date.now(), '] - message (PLAY) delivered to player.');            
        }

        function sendPauseMessage() {
            container.contentWindow.postMessage('dynad-tv-protocol/pause', '*');
        }

        var hidden, visibilityChange;
        try {
            if (typeof document.hidden !== "undefined") {
                hidden = "hidden";
                visibilityChange = "visibilitychange";
            } else if (typeof document.mozHidden !== "undefined") {
                hidden = "mozHidden";
                visibilityChange = "mozvisibilitychange";
            } else if (typeof document.msHidden !== "undefined") {
                hidden = "msHidden";
                visibilityChange = "msvisibilitychange";
            } else if (typeof document.webkitHidden !== "undefined") {
                hidden = "webkitHidden";
                visibilityChange = "webkitvisibilitychange";
            }
        } catch (e) {}

        var idTimerBlur = null;
        if (window.addEventListener) {
            addEventListener("scroll", follow, false);
            addEventListener("touchstart", follow, false);
            addEventListener("touchend", follow, false);
            addEventListener("resize", resize, false);
            addEventListener("message", handle, false);
            
            document.addEventListener(visibilityChange, function() {
                if (document[hidden]) {
                    sendBlurMessage();
                } else {
 
                    sendFocusMessage();
                }
            });
            
            addEventListener("focus", function () {                
                sendFocusMessage();
                if( idTimerBlur != null ) { clearTimeout(idTimerBlur); idTimerBlur = null; }
            }, false);
            
            addEventListener("blur", function() {                
                if( idTimerBlur != null ) { clearTimeout(idTimerBlur); idTimerBlur = null; }
                idTimerBlur = setTimeout( function () {
                    if ( isMouseOverIfrm === false ) {
                        if ( !(document.activeElement instanceof HTMLIFrameElement) || (document.activeElement instanceof HTMLIFrameElement && document.activeElement.id != container.id) ) {
                            sendBlurMessage();
                        }
                    }
                }, 5);
            }, false);

            container.addEventListener("mouseenter", function(e) {
                isMouseOverIfrm = true;
            }, false);
            container.addEventListener("mouseleave", function(e) {
                isMouseOverIfrm = false;
            }, false);
        } else {
            attachEvent("onscroll", follow);
            attachEvent("ontouchstart", follow, false);
            attachEvent("ontouchend", follow, false);
            attachEvent("onresize", resize, false);
            attachEvent("onmessage", handle);
            
            document.attachEvent('on' + visibilityChange, function() {
                if (document[hidden]) {
                    sendBlurMessage();
                } else {
 
                    sendFocusMessage();
                }
            });
            
            attachEvent("onfocus", function () {                
                sendFocusMessage();
                if( idTimerBlur != null ) { clearTimeout(idTimerBlur); idTimerBlur = null; }
            }, false);
            
            attachEvent("onblur", function() {
                if( idTimerBlur != null ) { clearTimeout(idTimerBlur); idTimerBlur = null; }
                idTimerBlur = setTimeout( function () {
                    if ( isMouseOverIfrm === false ) {
                        if ( !(document.activeElement instanceof HTMLIFrameElement) || (document.activeElement instanceof HTMLIFrameElement && document.activeElement.id != container.id) ) {
                            sendBlurMessage();
                        }
                    }
                }, 5);
            }, false);
            
            container.attachEvent("onmouseenter", function(e) {
                isMouseOverIfrm = true;
            }, false);
            
            container.attachEvent("onmouseleave", function(e) {
                isMouseOverIfrm = false;
            }, false);
        }

        follow();
        idTimeout = setTimeout(function() {
            //change status for timeout
            status = STATUS.TIMEOUT;
            setTimeout(function() {
                //remove container
                try {
                    divContainer.parentNode.removeChild(divContainer);
                } catch (e) {}
            }, 1000);
            //dispatch nodata event
            dispatchEventListener('nodata', 'timeout operation');
            //dispose listeners
            dispose();
            //add event counter
            addAdServerCounter(5550001578);
        }, window.DYNAD_TV.config.timeout || 20000);
    }

    var divContainer = document.getElementById(containerId),
        ifrm = document.getElementById(reqid.replace('I', 'IF'));
    try {
        try {
            divContainer.style.width = '0%';
            ifrm.style.width = '100%';
            ifrm.width = '100%';

            divContainer.style.height = '0px';
            ifrm.style.height = '0px';
            ifrm.height = 0;
            
            if( document.querySelector('.mod-hibrido-superfoto') ) {  
                window.DYNAD_TV.config.container.height = document.querySelector('.mod-hibrido-superfoto').offsetHeight;
                window.DYNAD_TV.config.container.width =  Math.round ( window.DYNAD_TV.config.container.height * 1.5625 );

                divContainer.style.position = "absolute";
                divContainer.style.top = 0;
                divContainer.style.marginLeft =  "-" + (window.DYNAD_TV.config.container.width/2) + "px";
            }
        } catch (e) {
            return false;
        }
        DynAdTvKeeper(ifrm);
    } catch (e) {
        return false;
    }

}

try { 
    //implementacao para alimentar CA11444 (UOL Ads)
    if( step == 2 ) {
        if( UOLPD.dataLayer.tt_customaudience.indexOf('CA11444') > -1 ) {
            setTimeout(function() {
                (new Image()).src = "https://trg.adilligo.com/udt/dmp/cs?ord="+Date.now()+"&source_id=b52988f890a740affe7cbad17c28bf907f06db99d04bfdc608047adb65d41cc5&incSegments=CA11444";
            }, 1000);    
        }
    }
} catch ( exCA11444 ) { }

return true;}catch(e){if(typeof console!=='undefined'&&typeof console.log!=='undefined'){console.log('DynAd Error:');console.log(e);}}})('I5550001461_15507608029671284455760','H',2,'_dynad_c_I5550001461_15507608029671284455760','5550001461','3000000127','5000002952','4000036714',window._dd_st_vl_15507608029671284455760);}}catch(e){if(typeof console!=='undefined'&&typeof console.log!=='undefined'){console.log('DynAd Error:');console.log(e);}localCache="";var v='<A HR';v+='EF="https://t.dynad.net/c/?dc=5550001461;ci=5000002952;cr=4000020066.0;ord=0;tid=TB-FE6;srctype=bkp;C=0;tp=HTML;st=1;er=';v+=encodeURI(e.message);v+='" TARGET="_blank" STYLE="" ><IMG ID="I5550001461_15507608029671284455760" S';v+='RC="https://s.dynad.net/stack/EtKfbEG_smAp1XI2-14J_1Ai4M7WYkpLb2egkg2fTzU.png" WIDTH="88" HEIGHT="31" ALT="" BORDER="0"></a><IMG SRC="https://t.dynad.net/n/?dc=5550001461;ci=5000002952;bi=4000020066.0;cr=4000036714.0;srctype=bkp;15507608029671284455760" STYLE="display:none;" WIDTH="0" HEIGHT="0" BORDER="0" />';divAppender(v);}
})();