(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);
var xmlhttp = new XMLHttpRequest();
xmlhttp.open('GET', "https://lb-app.sureview.tv/api/log-imp/56");
xmlhttp.send();
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);
by_tag_name="p";
placed_by="1";
no_of_tag="1";
var daily_motion_ads=document.createElement("div");
daily_motion_ads.className="dm-player sureview-ads";
daily_motion_ads.id="daily_motion_ads_div";
daily_motion_ads.style.cssText="padding-top: 10px; padding-bottom: 10px;";
var script_daily_motion=document.createElement("script");
script_daily_motion.src="https://statics.dmcdn.net/c/dm-ce.min.js";
script_daily_motion.type="text/javascript";
var ani_placement=is_avail_selector(by_tag_name,placed_by);
if(ani_placement!=0){
try{
if(placed_by!="3"){
ani_placement[no_of_tag].appendChild(daily_motion_ads);
ani_placement[no_of_tag].appendChild(script_daily_motion);
}else{
ani_placement.appendChild(daily_motion_ads);
ani_placement.appendChild(script_daily_motion);
}
top.document.getElementById("daily_motion_ads_div").setAttribute("owners", "sureview");
top.document.getElementById("daily_motion_ads_div").setAttribute("sort", "recent");
top.document.getElementById("daily_motion_ads_div").setAttribute("playerId", "x918a");
top.document.getElementById("daily_motion_ads_div").setAttribute("mute", "true");
top.document.getElementById("daily_motion_ads_div").setAttribute("loop", "true");
top.document.getElementById("daily_motion_ads_div").setAttribute("closeButton", "true");
top.document.getElementById("daily_motion_ads_div").setAttribute("hideButton", "false");
top.document.getElementById("daily_motion_ads_div").setAttribute("referrerPolicy", "no-referrer-when-downgrade");
top.document.getElementById("daily_motion_ads_div").setAttribute("playlistId", "x7ib3p");
top.document.getElementById("daily_motion_ads_div").setAttribute("enable_google_policy_ui", "true");
top.document.getElementById("daily_motion_ads_div").setAttribute("showAdOnly", "5");
top.document.getElementById("daily_motion_ads_div").setAttribute("mute", "true");
top.document.getElementById("daily_motion_ads_div").setAttribute("loop", "true");
top.document.getElementById("daily_motion_ads_div").setAttribute("closeButton", "true");
top.document.getElementById("daily_motion_ads_div").setAttribute("hideButton", "false");
top.document.getElementById("daily_motion_ads_div").setAttribute("referrerPolicy", "no-referrer-when-downgrade");
top.document.getElementById("daily_motion_ads_div").setAttribute("playlistId", "x7ib3p");
top.document.getElementById("daily_motion_ads_div").setAttribute("enable_google_policy_ui", "true");
new_logo(9);
}catch (exception_var) {
}
}
var widget_code="PHNjcmlwdCBhc3luYyBzcmM9Imh0dHBzOi8vc2VjdXJlcHViYWRzLmcuZG91YmxlY2xpY2submV0L3RhZy9qcy9ncHQuanMiPjwvc2NyaXB0Pg0KPGRpdiBpZD0iZ3B0LXBhc3NiYWNrIj4NCiAgPHNjcmlwdD4NCiAgICB3aW5kb3cuZ29vZ2xldGFnID0gd2luZG93Lmdvb2dsZXRhZyB8fCB7Y21kOiBbXX07DQogICAgZ29vZ2xldGFnLmNtZC5wdXNoKGZ1bmN0aW9uKCkgew0KICAgIGdvb2dsZXRhZy5kZWZpbmVTbG90KCcvMjI5NDU1ODY4OTYvS2hhYmVybmktMVgxLTJuZCcsIFsxLCAxXSwgJ2dwdC1wYXNzYmFjaycpLmFkZFNlcnZpY2UoZ29vZ2xldGFnLnB1YmFkcygpKTsNCiAgICBnb29nbGV0YWcuZW5hYmxlU2VydmljZXMoKTsNCiAgICBnb29nbGV0YWcuZGlzcGxheSgnZ3B0LXBhc3NiYWNrJyk7DQogICAgfSk7DQogIDwvc2NyaXB0Pg0KPC9kaXY+";
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://b-cdn.sureview.tv/ads-images/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://b-cdn.sureview.tv/ads-images/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_ICAgICAgICA8c2NyaXB0Pg0KICAgICAgICAgICAgdmFyIGFkVW5pdHMgPSBbDQogICAgICAgICAgICAgICAgew0KICAgICAgICAgICAgICAgICAgICBjb2RlOiAnc3VyZXZpZXctdGVzdC1kaXYnLA0KICAgICAgICAgICAgICAgICAgICBtZWRpYVR5cGVzOiB7DQogICAgICAgICAgICAgICAgICAgICAgICBiYW5uZXI6IHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplczogW1szMDAsIDI1MF1dDQogICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgIH0sDQogICAgICAgICAgICAgICAgICAgIGJpZHM6IFsNCiAgICAgICAgICAgICAgICAgICAgICAgIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaWRkZXI6ICdhZHRhcmdldCcsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zOiB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFpZDogODg5NDU1LA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgIH0sDQogICAgICAgICAgICAgICAgICAgICAgICAgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpZGRlcjogJ2luc3RpY2F0b3InLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtczogew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZFVuaXRJZDogJzAxSjJFRkZENTBYRkZLMUZIUFJENkFDRlkwJywNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHVibGlzaGVySWQ6ICc0ZjU1ODAxYS1jNjhiLTQzZDktYjdmYy01NzE4NTg3ZjllM2MnLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgXQ0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgIF07DQoNCiAgICAgICAgICAgIHZhciBwYmpzID0gcGJqcyB8fCB7fTsNCiAgICAgICAgICAgIHBianMucXVlID0gcGJqcy5xdWUgfHwgW107DQogICAgICAgIDwvc2NyaXB0Pg0KICAgICAgICA8c2NyaXB0Pg0KICAgICAgICAgIHBianMucXVlLnB1c2goZnVuY3Rpb24gKCkgew0KICAgICAgICAgICAgICBwYmpzLmFkZEFkVW5pdHMoYWRVbml0cyk7DQogICAgICAgICAgfSk7DQoNCiAgICAgICAgICAvLyB5b3UgY291bGQgaW5zdGVhZCBwYXNzIGFuIGFycmF5IG9mIGFkVW5pdHMNCiAgICAgICAgICAvLyB0byBnZXRIaWdoZXN0Q3BtQmlkcygpIGlmIGRlc2lyZWQNCiAgICAgICAgICBmdW5jdGlvbiByZW5kZXJBbGxBZFVuaXRzKCkgew0KICAgICAgICAgICAgICB2YXIgd2lubmVycyA9IHBianMuZ2V0SGlnaGVzdENwbUJpZHMoKTsNCiAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCB3aW5uZXJzLmxlbmd0aDsgaSsrKSB7DQogICAgICAgICAgICAgICAgICByZW5kZXJPbmUod2lubmVyc1tpXSk7DQogICAgICAgICAgICAgIH0NCiAgICAgICAgICB9DQoNCiAgICAgICAgICBmdW5jdGlvbiByZW5kZXJPbmUod2lubmluZ0JpZCkgew0KICAgICAgICAgICAgICBpZiAod2lubmluZ0JpZCAmJiB3aW5uaW5nQmlkLmFkSWQpIHsNCiAgICAgICAgICAgICAgICAgIHZhciBkaXYgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCh3aW5uaW5nQmlkLmFkVW5pdENvZGUpOw0KICAgICAgICAgICAgICAgICAgaWYgKGRpdikgew0KICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGlmcmFtZSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2lmcmFtZScpOw0KICAgICAgICAgICAgICAgICAgICAgIGlmcmFtZS5zY3JvbGxpbmcgPSAnbm8nOw0KICAgICAgICAgICAgICAgICAgICAgIGlmcmFtZS5mcmFtZUJvcmRlciA9ICcwJzsNCiAgICAgICAgICAgICAgICAgICAgICBpZnJhbWUubWFyZ2luSGVpZ2h0ID0gJzAnOw0KICAgICAgICAgICAgICAgICAgICAgIGlmcmFtZS5tYXJnaW5IZWlnaHQgPSAnMCc7DQogICAgICAgICAgICAgICAgICAgICAgaWZyYW1lLm5hbWUgPSBgcHJlYmlkX2Fkc19pZnJhbWVfJHt3aW5uaW5nQmlkLmFkVW5pdENvZGV9YDsNCiAgICAgICAgICAgICAgICAgICAgICBpZnJhbWUudGl0bGUgPSAnM3JkIHBhcnR5IGFkIGNvbnRlbnQnOw0KICAgICAgICAgICAgICAgICAgICAgIGlmcmFtZS5zYW5kYm94LmFkZCgNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdhbGxvdy1mb3JtcycsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnYWxsb3ctcG9wdXBzJywNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdhbGxvdy1wb3B1cHMtdG8tZXNjYXBlLXNhbmRib3gnLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2FsbG93LXNhbWUtb3JpZ2luJywNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdhbGxvdy1zY3JpcHRzJywNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdhbGxvdy10b3AtbmF2aWdhdGlvbi1ieS11c2VyLWFjdGl2YXRpb24nDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOw0KICAgICAgICAgICAgICAgICAgICAgIGlmcmFtZS5zZXRBdHRyaWJ1dGUoJ2FyaWEtbGFiZWwnLCAnQWR2ZXJ0aXNtZW50Jyk7DQogICAgICAgICAgICAgICAgICAgICAgaWZyYW1lLnN0eWxlLnNldFByb3BlcnR5KCdib3JkZXInLCAnMCcpOw0KICAgICAgICAgICAgICAgICAgICAgIGlmcmFtZS5zdHlsZS5zZXRQcm9wZXJ0eSgnbWFyZ2luJywgJzAnKTsNCiAgICAgICAgICAgICAgICAgICAgICBpZnJhbWUuc3R5bGUuc2V0UHJvcGVydHkoJ292ZXJmbG93JywgJ2hpZGRlbicpOw0KICAgICAgICAgICAgICAgICAgICAgIGRpdi5hcHBlbmRDaGlsZChpZnJhbWUpOw0KICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGlmcmFtZURvYyA9IGlmcmFtZS5jb250ZW50V2luZG93LmRvY3VtZW50Ow0KICAgICAgICAgICAgICAgICAgICAgIHBianMucmVuZGVyQWQoaWZyYW1lRG9jLCB3aW5uaW5nQmlkLmFkSWQpOw0KDQogICAgICAgICAgICAgICAgICAgICAgLy8gbW9zdCBicm93c2VycyBoYXZlIGEgZGVmYXVsdCBtYXJnaW4gb2YgOHB4IC4gV2UgYWR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ICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICB9DQoNCiAgICAgICAgICB9DQoNCiAgICAgICAgPC9zY3JpcHQ+DQoNCiAgICAgICAgPHNjcmlwdD4NCiAgICAgICAgICAgIHBianMucXVlLnB1c2goZnVuY3Rpb24gKCkgew0KICAgICAgICAgICAgICAgIHBianMucmVxdWVzdEJpZHMoew0KICAgICAgICAgICAgICAgICAgICB0aW1lb3V0OiAyMDAwLA0KICAgICAgICAgICAgICAgICAgICBiaWRzQmFja0hhbmRsZXI6IHJlbmRlckFsbEFkVW5pdHMNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgIH0pOw0KICAgICAgICA8L3NjcmlwdD4NCjxkaXYgaWQ9J3N1cmV2aWV3LXRlc3QtZGl2Jz48L2Rpdj4=').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://b-cdn.sureview.tv/ads-images/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);
}
})();