(function() {
var c=1;
var x = document.getElementById("Sureview56");
var sureview_logo_container=document.createElement("div");
var vdo = document.createElement("div");
var vi_maindiv = document.createElement("div");
var teads = document.createElement("script");
teads.id="sureview_2";
var third_party = document.createElement("script");
var adipolo = document.createElement("div");
var teads_main_div = document.createElement("div");
var vdo_id="";
var is_active_adipolo=0;
var is_active_teads=0;
var is_active_aniview=0;
var is_active_vdo=0;
var is_active_valueImpression=0;
var ad_displaying=0;
var running_ads=0;
var by_tag_name="";
var placement_salector="";
var no_of_tag="";
var placed_by="";
var priority1="2";
var priority2="1";
var priority3="4";
var refreshIntervalId;
var iframe="iframe";
var is_added_smc_header=0;
var vdo_player;
var teads_player;
var teads_ads_duration=10000;
var vdo_ads_duration=10000;
var setlogo_intval;
var setlogoTeads_intval;
var dailyMotionStyle = document.createElement('style');
dailyMotionStyle.innerHTML="#dailymotion-pip-large-viewport{ --dm--pip-left: 0px;} #dailymotion-pip-large-viewport{ --dm--pip-left: 0; --dm--pip-right: auto; } #dailymotion-pip-small-viewport {--dm--pip-size-width: 200px !important; --dm--pip-size-height: 110px !important;} .dm-player.dm-player-close-show #dailymotion-pip-large-viewport .dm__close-button, .dm-player.dm-player-close-show #dailymotion-pip-small-viewport .dm__close-button { visibility: visible !important;} .dm-player.dm-player-close-show .dm__close-button { visibility: visible !important; } .dm__close-button { position: absolute !important; top: var(--dm-close-top, -28px) !important; right: unset !important; width: var(--dm-close-width, 25px) !important; height: var(--dm-close-height, 25px) !important; background: var(--dm-close-bg, #000) !important; opacity: var(--dm-close-opacity, 0.45) !important; border-radius: 50% !important; padding: var(--dm-close-padding, 7px) !important; border: var(--dm-close-border, 0) !important; cursor: pointer; visibility: hidden; } .dailymotion-player-wrapper#dailymotion-pip-small-viewport .dm__close-button { left: 0px !important; right: unset !important; }";
top.document.getElementsByTagName('head')[0].appendChild(dailyMotionStyle);
var dailyMotionStyle = document.createElement('style');
dailyMotionStyle.innerHTML="#dailymotion-pip-small-viewport, #dailymotion-pip-large-viewport { width: var(--dm--pip-size-width, 410px) !important; left: var(--dm--pip-left, 0) !important; height: var(--dm--pip-size-height, 231px) !important; transition: right .5s ease !important; right: var(--dm--pip-right, initial) !important;} .dailymotion-player-wrapper#dailymotion-pip-small-viewport .dm__close-button { left: 0px !important; right: unset !important; }";
var reduce_size_for_big_screen= document.createElement('style');
reduce_size_for_big_screen.innerHTML="@media screen and (min-width: 640px) {.dm-player { padding-left: 20% !important; padding-right: 20% !important; }} #dailymotion-pip-small-viewport .dailymotion-player, #dailymotion-pip-small-viewport .dm__pip-new-controls{ border-radius: 10px; }";
top.document.getElementsByTagName('head')[0].appendChild(reduce_size_for_big_screen);
var by_tag_name=1;
placement_salector=is_avail_selector(placed_by,by_tag_name);
setTimeout(function(){
var vli_data="6ae4c63af184a174f1c5fe64053d5420";
var s = document.createElement("script");
s.type = "text/javascript";
s.src = "//services.vlitag.com/adv1/?q="+vli_data;
s.async = "true";
s.defer = "true";
document.head.appendChild(s);
var s2 = document.createElement("script");
s2.append("var vitag = vitag || {};");
document.head.appendChild(s2);
var s3 = document.createElement("script");
s3.append("vitag = vitag || {}; vitag.smartBannerConfig = vitag.smartBannerConfig || {}; vitag.smartBannerConfig.enablePC = false; vitag.smartBannerConfig.enableMobile = false;");
document.head.appendChild(s3);
var s3 = document.createElement("script");
s3.append("vitag.outStreamConfig= { enablePC: false, enableMobile: false, }");
document.head.appendChild(s3);
var widget_code="PHNjcmlwdCBhc3luYyBzcmM9Imh0dHBzOi8vc2VjdXJlcHViYWRzLmcuZG91YmxlY2xpY2submV0L3RhZy9qcy9ncHQuanMiPjwvc2NyaXB0Pg0KPGRpdiBpZD0ia2hhYmVybmktY3VzdG9tLXBhc3NiYWNrIj4NCiAgPHNjcmlwdD4NCiAgICB3aW5kb3cuZ29vZ2xldGFnID0gd2luZG93Lmdvb2dsZXRhZyB8fCB7Y21kOiBbXX07DQogICAgZ29vZ2xldGFnLmNtZC5wdXNoKGZ1bmN0aW9uKCkgew0KICAgIGdvb2dsZXRhZy5kZWZpbmVTbG90KCcvMjI5NDU1ODY4OTYva2hhYmVybmlDdXN0b20nLCBbMSwgMV0sICdraGFiZXJuaS1jdXN0b20tcGFzc2JhY2snKS5hZGRTZXJ2aWNlKGdvb2dsZXRhZy5wdWJhZHMoKSk7DQogICAgZ29vZ2xldGFnLmVuYWJsZVNlcnZpY2VzKCk7DQogICAgZ29vZ2xldGFnLmRpc3BsYXkoJ2toYWJlcm5pLWN1c3RvbS1wYXNzYmFjaycpOw0KICAgIH0pOw0KICA8L3NjcmlwdD4NCjwvZGl2Pg==";
var googleBs64Code=widget_code;
top.svJQInj_1 = {};
by_tag_name="p";
placed_by="1";
no_of_tag="0";
if (!top.window.jQuery) {
var dJqDynamic = document.createElement("script");
dJqDynamic.src = atob("aHR0cHM6Ly9hamF4Lmdvb2dsZWFwaXMuY29tL2FqYXgvbGlicy9qcXVlcnkvMy43LjAvanF1ZXJ5Lm1pbi5qcw==");
top.document.getElementsByTagName("head")[0].append(dJqDynamic);
dJqDynamic.onload = function(){
top.svJQInj_1 = jQuery.noConflict(true);
}
}else{
}
setTimeout(function(){
try{
var s3 = document.createElement("style");
s3.append("#dailymotion-pip-small-viewport, #dailymotion-pip-large-viewport { width: var(--dm--pip-size-width, 410px) !important; left: var(--dm--pip-left, 0) !important; height: var(--dm--pip-size-height, 231px) !important; transition: right .5s ease !important; right: var(--dm--pip-right, initial) !important; display: block !important; bottom: var(--dm--pip-bottom, 0) !important; top: var(--dm--pip-top, initial) !important; }");
top.document.head.appendChild(s3);
}catch{
}
if(document.getElementsByClassName('teads-inread').length>0){
var teadsMarginStyle = document.createElement('style');
teadsMarginStyle.innerHTML=".teads-inread {padding-bottom:10px !important;}";
document.getElementsByClassName('teads-inread')[0].appendChild(teadsMarginStyle);
}
},8000);
},800);
function set_aniview_after15sec(){
setlogoTeads_intval=setInterval(function(){
try{
document.querySelector(".teads-inread").remove();
}catch{
}
},15000);
}
function new_logo(company_id){
var isLogoTriggered = false;
var isLogoTriggeredTeads = false;
if(company_id==2){
var test_id=56;
setlogoTeads_intval=setInterval(function(){
teads_primary_div=document.getElementById('teads0');
if(test_id==64 && !isLogoTriggeredTeads){
isLogoTriggeredTeads = true;
clearInterval(setlogoTeads_intval);
var bottom_div = document.createElement("div");
bottom_div.id="sureview_branding_2";
bottom_div.style.cssText="line-height:0px;";
bottom_div.className="sureviewBottomDiv sureviewtv";
var anchor1=document.createElement("a");
anchor1.href="http://sureview.tv/";
anchor1.target="_BLANK";
var bottom_logo_img = document.createElement("img");
bottom_logo_img.id="sureview_logo_bottom_2";
bottom_logo_img.src="https://app.sureview.tv/logo/sureview_logo.svg";
bottom_logo_img.style.cssText="height: 18px !important; margin: 0 !important; margin-top: 2px !important; width: 70px !important;";
anchor1.appendChild(bottom_logo_img);
bottom_div.appendChild(anchor1);
teads_primary_div.appendChild(bottom_div);
}else{
}
},1000);
}else{
daily_motion_ads=document.getElementById('daily_motion_ads_div');
setlogo_intval=setInterval(function(){
if(document.getElementsByClassName('dm-player-wrapper').length > 0 && !isLogoTriggered){
isLogoTriggered = true;
clearInterval(setlogo_intval);
var bottom_div = document.createElement("div");
bottom_div.id="sureview_branding";
bottom_div.style.cssText="line-height:0px;";
bottom_div.className="sureviewBottomDiv sureviewtv";
var anchor1=document.createElement("a");
anchor1.href="http://sureview.tv/";
anchor1.target="_BLANK";
var bottom_logo_img = document.createElement("img");
bottom_logo_img.id="sureview_logo_bottom";
bottom_logo_img.src="https://app.sureview.tv/logo/sureview_logo.svg";
bottom_logo_img.style.cssText="height: 18px !important; margin: 0 !important; margin-top: 2px !important; width: 70px !important;";
anchor1.appendChild(bottom_logo_img);
bottom_div.appendChild(anchor1);
daily_motion_ads.appendChild(bottom_div);
is_dm_ready();
}
},1000);
}
}
function is_dm_ready(){
var is_dm_sv_ready = setInterval(function(){
if(top.document.querySelectorAll(".dailymotion-player-wrapper .dm__close-button").length > 0){
clearInterval(is_dm_sv_ready);
document.querySelector(".dailymotion-player-wrapper .dm__close-button").innerHTML += '';
}
},500);
}
function is_avail_selector(name, by){
if(by==1){
placement_salector=document.getElementsByTagName(name);
if(placement_salector.length>0){
return placement_salector;
}else{
return 0;
}
}else if(by==2){
placement_salector=document.getElementsByClassName(name);
if(placement_salector.length>0){
return placement_salector;
}else{
return 0;
}
}else if(by==3){
placement_salector=top.document.getElementById(name);
if(placement_salector===null){
return 0;
}else{
return placement_salector;
}
}else if(by==4){
placement_salector=document.querySelectorAll(name);
if(placement_salector===null){
return 0;
}else{
return placement_salector;
}
}else{
placement_salector=document.getElementById(name);
if(placement_salector===null){
return 0;
}else{
return placement_salector;
}
}
}
function set_bottom_logo(company){
var counter=1;
setlogo_intval=setInterval(function(){
counter++;
try{
document.getElementById("sureview_branding").remove();
}catch(error){
}
var sureview_div=document.getElementById('Sureview56').clientWidth;
try{
if(company==1){
var video_div=document.getElementsByClassName('ima-ad-container')[0].clientWidth;
}else if(company==2){
var video_div=document.getElementsByClassName('teads-player')[0].clientWidth;
}else if(company==4){
var video_div=document.getElementById('ifr_PGRpdiBpZD0ic3VyZXZpZXctc3RpY2t5LWJhbm5lciIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmNmY2ZjYwMDsgcG9zaXRpb246IGZpeGVkOyBib3R0b206IC01MHB4OyBsZWZ0OjA7IG92ZXJmbG93OiBoaWRkZW47IGRpcmVjdGlvbjogbHRyICFpbXBvcnRhbnQ7IHRyYW5zZm9ybTogc2NhbGUoMC41Nik7IG1heC13aWR0aDogMzAwcHg7IGxlZnQ6IC01MHB4OyBtYXJnaW46IGF1dG87IHotaW5kZXg6IDk5OTk5OTk5OSAhaW1wb3J0YW50OyI+DQoJPGRpdiBjbGFzcz0iY3Jvc3Mtc3Ytc3RpY2t5LWJhbm5lciIgaWQ9ImNyb3NzLXN2LXN0aWNreS1iYW5uZXIiIHN0eWxlPSJkaXNwbGF5OiBmbGV4OyBiYWNrZ3JvdW5kOiAjMDAwMDAwOyBkaXJlY3Rpb246IGx0ciAhaW1wb3J0Y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4OiAwIDEgYXV0bzsgbWFyZ2luLWxlZnQ6IGF1dG87IGNvbG9yOndoaXRlOyBmb250LXNpemU6IDEycHg7IGRpc3BsYXk6IGZsZXg7IGFsaWduLWl0ZW1zOiBjZW50ZXI7IGp1c3RpZnktY29udGVudDogY2VudGVyOyI+PGEgaHJlZj0iaHR0cHM6Ly93d3cuc3VyZXZpZXcudHYvIiB0YXJnZXQ9Il9CTEFOSyIgc3R5bGU9ImNvbG9yOndoaXRlOyBwYWRkaW5nLWxlZnQ6IDJweDsgcGFkZGluZy1yaWdodDogNHB4OyI+IDxpbWcgc3JjPSJodHRwczovL2FwcC5zdXJldmlldy50di9sb2dvL3N1cmV2aWV3X2Jhbm5lcl9sb2dvLnN2ZyIgc3R5bGU9ImhlaWdodDogMjJweDsgcGFkZGluZy10b3A6IDJweDsgcGFkZGluZy1ib3R0b206IDJweDsiPjwvYT48L3NwYW4+DQoJPC9kaXY+DQogICAgPHNjcmlwdD4NCiAgICAgICAgICAgIHZhciBhZFVuaXRzID0gWw0KICAgICAgICAgICAgICAgIHsNCiAgICAgICAgICAgICAgICAgICAgY29kZTogJ3N1cmV2aWV3LXN0aWNreS1iYW5uZXItYWRzJywNCiAgICAgICAgICAgICAgICAgICAgbWVkaWFUeXBlczogew0KICAgICAgICAgICAgICAgICAgICAgICAgYmFubmVyOiB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZXM6IFtbMzAwLCAyNTBdXQ0KICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICB9LA0KICAgICAgICAgICAgICAgICAgICBiaWRzOiBbDQogICAgICAgICAgICAgICAgICAgICAgICB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmlkZGVyOiAnYWR0YXJnZXQnLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtczogew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhaWQ6IDg4OTQ1NSwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICB9LA0KICAgICAgICAgICAgICAgICAgICAgICAgIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaWRkZXI6ICdpbnN0aWNhdG9yJywNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXM6IHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRVbml0SWQ6ICcwMUoyRUZGRDUwWEZGSzFGSFBSRDZBQ0ZZMCcsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1Ymxpc2hlcklkOiAnNGY1NTgwMWEtYzY4Yi00M2Q5LWI3ZmMtNTcxODU4N2Y5ZTNjJywNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgIF0NCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICBdOw0KDQogICAgICAgICAgICB2YXIgcGJqcyA9IHBianMgfHwge307DQogICAgICAgICAgICBwYmpzLnF1ZSA9IHBianMucXVlIHx8IFtdOw0KICAgICAgICA8L3NjcmlwdD4NCiAgICAgICAgPHNjcmlwdD4NCiAgICAgICAgICBwYmpzLnF1ZS5wdXNoKGZ1bmN0aW9uICgpIHsNCiAgICAgICAgICAgICAgcGJqcy5hZGRBZFVuaXRzKGFkVW5pdHMpOw0KICAgICAgICAgIH0pOw0KDQogICAgICAgICAgLy8geW91IGNvdWxkIGluc3RlYWQgcGFzcyBhbiBhcnJheSBvZiBhZFVuaXRzDQogICAgICAgICAgLy8gdG8gZ2V0SGlnaGVzdENwbUJpZHMoKSBpZiBkZXNpcmVkDQogICAgICAgICAgZnVuY3Rpb24gcmVuZGVyQWxsQWRVbml0cygpIHsNCiAgICAgICAgICAgICAgdmFyIHdpbm5lcnMgPSBwYmpzLmdldEhpZ2hlc3RDcG1CaWRzKCk7DQogICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgd2lubmVycy5sZW5ndGg7IGkrKykgew0KICAgICAgICAgICAgICAgICAgcmVuZGVyT25lKHdpbm5lcnNbaV0pOw0KICAgICAgICAgICAgICB9DQogICAgICAgICAgfQ0KDQogICAgICAgICAgZnVuY3Rpb24gcmVuZGVyT25lKHdpbm5pbmdCaWQpIHsNCiAgICAgICAgICAgICAgaWYgKHdpbm5pbmdCaWQgJiYgd2lubmluZ0JpZC5hZElkKSB7DQogICAgICAgICAgICAgICAgICB2YXIgZGl2ID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQod2lubmluZ0JpZC5hZFVuaXRDb2RlKTsNCiAgICAgICAgICAgICAgICAgIGlmIChkaXYpIHsNCiAgICAgICAgICAgICAgICAgICAgICBjb25zdCBpZnJhbWUgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdpZnJhbWUnKTsNCiAgICAgICAgICAgICAgICAgICAgICBpZnJhbWUuc2Nyb2xsaW5nID0gJ25vJzsNCiAgICAgICAgICAgICAgICAgICAgICBpZnJhbWUuZnJhbWVCb3JkZXIgPSAnMCc7DQogICAgICAgICAgICAgICAgICAgICAgaWZyYW1lLm1hcmdpbkhlaWdodCA9ICcwJzsNCiAgICAgICAgICAgICAgICAgICAgICBpZnJhbWUubWFyZ2luSGVpZ2h0ID0gJzAnOw0KICAgICAgICAgICAgICAgICAgICAgIGlmcmFtZS5uYW1lID0gYHByZWJpZF9hZHNfaWZyYW1lXyR7d2lubmluZ0JpZC5hZFVuaXRDb2RlfWA7DQogICAgICAgICAgICAgICAgICAgICAgaWZyYW1lLnRpdGxlID0gJzNyZCBwYXJ0eSBhZCBjb250ZW50JzsNCiAgICAgICAgICAgICAgICAgICAgICBpZnJhbWUuc2FuZGJveC5hZGQoDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnYWxsb3ctZm9ybXMnLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2FsbG93LXBvcHVwcycsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnYWxsb3ctcG9wdXBzLXRvLWVzY2FwZS1zYW5kYm94JywNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdhbGxvdy1zYW1lLW9yaWdpbicsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnYWxsb3ctc2NyaXB0cycsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnYWxsb3ctdG9wLW5hdmlnYXRpb24tYnktdXNlci1hY3RpdmF0aW9uJw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsNCiAgICAgICAgICAgICAgICAgICAgICBpZnJhbWUuc2V0QXR0cmlidXRlKCdhcmlhLWxhYmVsJywgJ0FkdmVydGlzbWVudCcpOw0KICAgICAgICAgICAgICAgICAgICAgIGlmcmFtZS5zdHlsZS5zZXRQcm9wZXJ0eSgnYm9yZGVyJywgJzAnKTsNCiAgICAgICAgICAgICAgICAgICAgICBpZnJhbWUuc3R5bGUuc2V0UHJvcGVydHkoJ21hcmdpbicsICcwJyk7DQogICAgICAgICAgICAgICAgICAgICAgaWZyYW1lLnN0eWxlLnNldFByb3BlcnR5KCdvdmVyZmxvdycsICdoaWRkZW4nKTsNCiAgICAgICAgICAgICAgICAgICAgICBkaXYuYXBwZW5kQ2hpbGQoaWZyYW1lKTsNCiAgICAgICAgICAgICAgICAgICAgICBjb25zdCBpZnJhbWVEb2MgPSBpZnJhbWUuY29udGVudFdpbmRvdy5kb2N1bWVudDsNCiAgICAgICAgICAgICAgICAgICAgICBwYmpzLnJlbmRlckFkKGlmcmFtZURvYywgd2lubmluZ0JpZC5hZElkKTsNCg0KICAgICAgICAgICAgICAgICAgICAgIC8vIG1vc3QgYnJvd3NlcnMgaGF2ZSBhIGRlZmF1bHQgbWFyZ2luIG9mIDhweCAuIFdlIGFkZCB0aG9zZSBhZnRlciBwcmViaWQgaGFzIHdyaXR0ZW4gdG8gdGhlIGlmcmFtZS4NCiAgICAgICAgICAgICAgICAgICAgICAvLyBpbnRlcm5hbG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gfQ0KDQogICAgICAgIDwvc2NyaXB0Pg0KDQogICAgICAgIDxzY3JpcHQ+DQogICAgICAgICAgICBwYmpzLnF1ZS5wdXNoKGZ1bmN0aW9uICgpIHsNCiAgICAgICAgICAgICAgICBwYmpzLnJlcXVlc3RCaWRzKHsNCiAgICAgICAgICAgICAgICAgICAgdGltZW91dDogMjAwMCwNCiAgICAgICAgICAgICAgICAgICAgYmlkc0JhY2tIYW5kbGVyOiByZW5kZXJBbGxBZFVuaXRzDQogICAgICAgICAgICAgICAgfSk7DQogICAgICAgICAgICB9KTsNCiAgICAgICAgPC9zY3JpcHQ+DQoJPGRpdiBpZD0ic3VyZXZpZXctc3RpY2t5LWJhbm5lci1hZHMiIGNsYXNzPSJzdXJldmlldy1zdGlja3ktYmFubmVyLWFkcyIgc3R5bGU9Im1heC13aWR0aDogMzAwcHg7IG1heC1oZWlnaHQ6IDI1MHB4OyBtYXJnaW4tbGVmdDogMHB4ICFpbXBvcnRhbnQ7bWFyZ2luLXRvcDogMHB4OyI+PC9kaXY+DQo8L2Rpdj4=').clientWidth;
}else if(company==9){
var video_div=document.getElementsByClassName("dm-player")[0].clientWidth;
}else{
video_div=sureview_div;
}
var diff=(sureview_div)-(video_div);
var padd='0px';
if(diff>10){
padd=diff/2+"px";
}
var bottom_div = document.createElement("div");
bottom_div.id="sureview_branding";
bottom_div.className="sureviewBottomDiv sureviewtv";
var anchor1=document.createElement("a");
anchor1.href="http://sureview.tv/";
anchor1.target="_BLANK";
var bottom_logo_img = document.createElement("img");
bottom_logo_img.id="sureview_logo_bottom";
bottom_logo_img.src="https://app.sureview.tv/logo/sureview_logo.svg";
anchor1.appendChild(bottom_logo_img);
bottom_div.appendChild(anchor1);
if(company==1){
try{
vdo_player= document.getElementsByClassName("vdo_content")[0].getElementsByTagName("video-js")[0].getElementsByClassName('ima-ad-container')[0].getElementsByTagName('div')[1].getElementsByTagName('video')[0];
if(vdo_player.duration>5){
x.appendChild(bottom_div);
document.getElementById("sureview_logo_bottom").style.padding = "0px "+padd+" 0px 0px";
if(video_div>0){
clearInterval(setlogo_intval);
}
}else{
if(counter==2){
clearInterval(setlogo_intval);
}
}
}catch(error){
if(counter==2){
clearInterval(setlogo_intval);
}
}
}else if(company==2){
try{
teads_player=document.getElementsByClassName("teads-inread")[0].getElementsByTagName("iframe")[0].contentDocument.getElementsByTagName("iframe")[0].contentDocument.getElementsByTagName('video')[0];
if(teads_player.duration>5){
x.appendChild(bottom_div);
document.getElementById("sureview_logo_bottom").style.padding = "0px "+padd+" 0px 0px";
if(video_div>0){
clearInterval(setlogo_intval);
}
}else{
}
}catch(error){
}
}else if(company==9){
}
}catch(Error){
if(counter==10){
clearInterval(setlogo_intval);
}
}
},1000);
}
function get_video_duration(){
refreshIntervalId=setInterval(function(){
try{
vdo_player= document.getElementsByClassName("vdo_content")[0].getElementsByTagName("video-js")[0].getElementsByClassName('ima-ad-container')[0].getElementsByTagName('div')[1].getElementsByTagName('video')[0];
if(isNaN(vdo_player.duration) || vdo_player.duration==0){
setTimeout(function(){
clearInterval(refreshIntervalId);
change_ads(2);
},1000);
}else{
}
}catch(error){
try{
teads_player=document.getElementsByClassName("teads-inread")[0].getElementsByTagName("iframe")[0].contentDocument.getElementsByTagName("iframe")[0].contentDocument.getElementsByTagName('video')[0];
setTimeout(function(){
if(teads_player.currentTime===0){
change_ads(1);
clearInterval(refreshIntervalId);
}else{
}
},10000);
if(isNaN(teads_player.duration)){
setTimeout(function(){
change_ads(1);
},10000);
}else{
if(teads_player.duration==teads_player.currentTime){
setTimeout(function(){
change_ads(1);
},10000);
}
}
}catch(error){
clearInterval(refreshIntervalId);
try{
teads_player=document.getElementsByClassName("teads-inread")[0].getElementsByTagName("iframe")[0].children;
}catch(error){
change_ads(1);
}
}
}
}, 10000);
}
function change_ads(ads_id){
clearInterval(refreshIntervalId);
if(ads_id==1){
add_vdo();
}else if(ads_id==2){
add_teads();
}
}
function add_vdo(){
if(is_active_vdo==1){
set_bottom_logo(1);
try{
document.querySelector('script[src*="vdo.ai"]').remove();
}catch(error){
console.log("VDO ERROR",error);
}
document.getElementsByClassName("sureview-content")[0].innerHTML = "";
running_ads=1;
if(placement_salector!=0){
try {
placement_salector[no_of_tag].appendChild(x);
}
catch (exception_var) {
}
ad_displaying=1;
x.appendChild(vdo);
(function(v,d,o,ai)
{ai=d.createElement('script');ai.defer=true;ai.async=true;ai.src=v.location.protocol+o;d.head.appendChild(ai);})(window, document, '//a.vdo.ai/core/'+vdo_id+'/vdo.ai.js');
}else{
x.appendChild(vdo);
(function(v,d,o,ai)
{ai=d.createElement('script');ai.defer=true;ai.async=true;ai.src=v.location.protocol+o;d.head.appendChild(ai);})(window, document, '//a.vdo.ai/core/'+vdo_id+'/vdo.ai.js');
}
}
}
function add_teads(){
if(is_active_teads==1){
set_bottom_logo(2);
clearInterval(setlogo_intval);
document.getElementsByClassName("sureview-content")[0].innerHTML = "";
running_ads=2;
if(placement_salector!=0){
ad_displaying=1;
x.appendChild(teads_main_div);
try {
placement_salector[no_of_tag].appendChild(x);
}catch (exception_var) {
}
}else{
x.appendChild(teads_main_div);
}
}
}
function remove_logo_2(){
try{
document.getElementById("sureview_branding").remove();
}catch(error){
}
}
const box = document.getElementById('Sureview56');
document.addEventListener('scroll', function () {
var inVpPartial = isElementPartiallyInViewport(box);
if(inVpPartial==true){
}else{
}
}, {
passive: true
});
function isElementPartiallyInViewport(el)
{
if (typeof jQuery !== 'undefined' && el instanceof jQuery)
el = el[0];
var rect = el.getBoundingClientRect();
var windowHeight = (window.innerHeight || document.documentElement.clientHeight);
var windowWidth = (window.innerWidth || document.documentElement.clientWidth);
var vertInView = (rect.top <= windowHeight) && ((rect.top + rect.height) >= 0);
var horInView = (rect.left <= windowWidth) && ((rect.left + rect.width) >= 0);
return (vertInView && horInView);
}
})();