-->
;
})( configs );
}
slotdfpev.doscrollevent = function() {
slotdfpev.scrollevent = true;
}
slotdfpev.addtolazyload = function(slot){
slotdfpev.lazyloadSlots.push(slot);
slotdfpev.doscrollevent();
}
slotdfpev.addtorefresh = function(slot){
slotdfpev.torefresh.push(slot);
}
slotdfpev.elemonscreen = function(e, n, t) {
if(document.hidden == true){return false}
if(e.style.visibilit == 'hidden' && !Boolean(e.offsetParent)){return false}
n = n || 0, t = t || "visible";
var o = e.getBoundingClientRect(),
i = Math.max(document.documentElement.clientHeight, window.innerHeight),
d = o.bottom - n < 0,
w = o.top - i + n >= 0;
return "above" === t ? d : "below" === t ? w : !d && !w
}
slotdfpev.displayslots = function(){
for(var i = 0; i < slotdfpev.lazyloadSlots.length; i++){
if(slotdfpev.elemonscreen(slotdfpev.lazyloadSlots[i].configs.elm, -700)){
(function(slot){
slotdfpev.refreshslot([slot]);
slotdfpev.addtorefresh(slot);
})(slotdfpev.lazyloadSlots.splice(i,1).shift());
}
}
}
slotdfpev.refreshslot = function(slots) {
pbjs.que.push(function() {
var unitDeclared = [];
var slotsIds = [];
var unitSimilars = [];
for (var n in slots) {
var slotid = slots[n].configs.elm.id;
googletag.display(slotid);
slotsIds.push(slotid);
unitDeclared = pbjs.unitsAd.filter(function(unit){return unit.code == slotid});
unitSimilars = pbjs.unitsAd.filter(function(unit){return !unitDeclared.length && (JSON.stringify(unit.sizes) == JSON.stringify(slots[n].configs.formato))}).slice(0,1);
for(var u in unitSimilars){
var unitAd = {
code: slotid,
sizes: unitSimilars[u].sizes,
bids: unitSimilars[u].bids
}
unitSimilars[u].sizeMapping && (unitAd['sizeMapping'] = unitSimilars[u].sizeMapping);
pbjs.unitsAd.push(unitAd);
pbjs.addAdUnits(unitAd);
}
}
pbjs.requestBids({
timeout: PREBID_TIMEOUT,
adUnitCodes: slotsIds,
bidsBackHandler: function() {
pbjs.setTargetingForGPTAsync(slotsIds);
googletag.pubads().refresh(slots.map(function(s){return s.slot}));
}
});
});
}
slotdfpev.refreshslots = function() {
for(var attr in slotdfpev.torefresh){
if(slotdfpev.torefresh[attr].configs.elm.clientHeight){
if(slotdfpev.elemonscreen(slotdfpev.torefresh[attr].configs.elm)){
if(!slotdfpev.torefresh[attr]['timeoutrefresh']){
(function(slot){
slot['timeoutrefresh'] = setTimeout(googletag.cmd.push, slot.configs.refresh, function(){
slot['refresh'] = slot['refresh'] || 0;
slot.slot.setTargeting('refresh', (++slot['refresh']).toString());
slotdfpev.refreshslot([slot]);
clearTimeout(slot['timeoutrefresh']);
slot['timeoutrefresh'] = false;
slotdfpev.refreshslots();
});
})(slotdfpev.torefresh[attr]);
}
}else{
if(slotdfpev.torefresh[attr]['timeoutrefresh']){
clearTimeout(slotdfpev.torefresh[attr]['timeoutrefresh']);
slotdfpev.torefresh[attr]['timeoutrefresh'] = false;
}
}
}
}
}
window.addEventListener('DOMContentLoaded', slotdfpev.doscrollevent);
window.addEventListener('load', slotdfpev.doscrollevent);
window.addEventListener('resize', slotdfpev.doscrollevent);
window.addEventListener('scroll', slotdfpev.doscrollevent);
slotdfpev.testScrollEvent = function(){
if(slotdfpev.scrollevent) {
slotdfpev.scrollevent = false;
slotdfpev.lazyloadSlots.length && slotdfpev.displayslots();
slotdfpev.torefresh.length && slotdfpev.refreshslots();
}
requestAnimationFrame(slotdfpev.testScrollEvent);
}
var requestAnimationFrame = window.requestAnimationFrame || (function() {
var timeLast = 0;
return window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(callback) {
var timeCurrent = (new Date()).getTime(),timeDelta;
timeDelta = Math.max(0, 16 - (timeCurrent - timeLast));
timeLast = timeCurrent + timeDelta;
return setTimeout(function() { callback(timeCurrent + timeDelta); }, timeDelta);
};
})();
requestAnimationFrame(slotdfpev.testScrollEvent);
googletag.cmd.push(function(){
slotdfp['cb-publicidade-dhtml-1x1'] = googletag.defineOutOfPageSlot('/6887/portal-correioweb/correiobraziliense-com-br/acervo/interna','cb-publicidade-dhtml-1x1').setTargeting('formato',['dhtml-1x1']).setTargeting('pos',['0']).addService(googletag.pubads());
slotdfp['publicidade-anchorads-1'] = googletag.defineSlot('/6887/portal-correioweb/correiobraziliense-com-br/acervo/interna',[[300,50],[320,50]],'publicidade-anchorads-1').
setTargeting('pos',[(++indexformats).toString()]).
setTargeting('identificador','publicidade-anchorads-1').
defineSizeMapping(googletag.sizeMapping().
addSize([748,0],[728,90]).build()).
addService(googletag.pubads());
(function(e){try{var c=JSON.parse(function(a){a+="=";for(var c=document.cookie.split(";"),d=0;d