var ultimediaVisiblePlayer=function(){var l=false;var m=new Array();var f=new Array();var K=false;var J=false;var z=false;var L=new Array();var x=new Array();var y=new Array();var d=new Array();var t=new Array();var A=new Array();var M=new Array();var s=0;var p=0;var k=300;var C=this;var v=7;var G=false;var D=false;var B=false;var o=false;var w=0;var i=false;var q=false;var E=false;var n=false;var H=false;var j=false;var c=new Array();var r=window.outerWidth||screen.width;var I=(r<=420)?true:false;var b=window.outerHeight;var a=new Array();var g=this;window.addEventListener("scroll",function(N){if(!l&&G!=false){clearTimeout(s);s=setTimeout(function(){g.scrollVisiblePlayer()},15);clearTimeout(p);p=setTimeout(function(){C.check_play()},200)}},false);this.addCss=function(N,R,P,Q,O){if(!G&&typeof N!="undefined"&&N!=0){G=".visible_player {position: fixed !important; z-index: 1000 !important;";if(I){switch(O){case 1:Q=r;break;case 2:Q=r*0.75;break;case 3:Q=r*0.45;break}G=G+"top : auto !important; left: 0 !important; bottom:0 !important; right:auto !important;";B="auto";o=R;w=P;i="0";q="0";E="auto"}else{switch(N){case 1:G=G+"top : auto !important; left: auto !important; bottom:"+R+"px !important; right:"+P+"px !important;";B="auto";i=R;q="auto";E=P;break;case 2:G=G+"bottom : auto !important; left: auto !important; top:"+R+"px !important; right:"+P+"px !important;";B=R;i="auto";q="auto";E=P;break;case 3:G=G+"bottom : auto !important; right: auto !important; top:"+R+"px !important; left:"+P+"px !important;";B=R;i="auto";q=P;E="auto";break;case 4:G=G+"top : auto !important; right: auto !important; bottom:"+R+"px !important; left:"+P+"px !important;";B="auto";i=R;q=R;E="auto";break}}G=G+"width: "+Q+"px !important;}";D=N;n=Q;j=document.head||document.getElementsByTagName("head")[0],H=document.createElement("style");H.type="text/css";if(H.styleSheet){H.styleSheet.cssText=G}else{H.appendChild(document.createTextNode(G))}j.appendChild(H)}};this.findVideos=function(W,R,Y,S,U){this.addCss(W,R,Y,S,U);var P=document.querySelectorAll("iframe");for(var V=0;V=Y[1]+0.5*Y[5])&&(S[2]>=Y[0])&&(S[3]>=Y[3]);var W=(f[ae]==1||f[ae]==3)&&(S[0]<=Y[2])&&(S[3]<=Y[1]+0.5*Y[5])&&(S[2]>=Y[0])&&(S[1]<=Y[1]);var P=false;if(f[ae]==5){P=K}else{P=!K&&((R||W)&&L[ae]=="play"&&!x[ae])}if(!(R||W)&&(typeof ultimediaNotification!="undefined"&&ultimediaNotification.is_notif_visible)){ultimediaNotification.hideNotif()}if(0=Y[1]+0.5*Y[5])&&(S[2]>=Y[0])&&(S[3]>=Y[3]);var W=(f[ae]==1||f[ae]==3)&&(S[0]<=Y[2])&&(S[3]<=Y[1]+0.5*Y[5])&&(S[2]>=Y[0])&&(S[1]<=Y[1]);var P=!K&&(W||R);var O=m[ae]._jw.getState()=="PLAYING"||m[ae]._jw.getState()=="playing"||m[ae]._jw.getState()=="buffer"||m[ae]._jw.getState()=="BUFFER"||m[ae]._state=="preroll"||m[ae]._state=="after_preroll"||m[ae]._state=="before_preroll"&&!m[ae]._prefetching;if(d[ae]=="pauseAd"){O=false}else{if(d[ae]=="pause"&&O){for(var ac=0;acr){ab=Math.round((screen.width-V)/2)+"px !important;"}else{ab=Math.round(w/2)+"px !important;"}}m[ah].style.cssText="z-index:1000;position:fixed !important;height:"+ad+"px !important;width:"+V+"px !important;bottom:"+Q+"right:"+T+"top:"+R+"left:"+ab;C.resizeDTK(V,ad,ah)}})}}else{var V=Math.round(n);var ad=Math.round((n*9)/16);R="auto !important;";ab="0 !important;"}var P=1;Q="0 !important;";T="0 !important;";m[ah].style.cssText="z-index:1000;position:fixed !important;height:"+ad+"px !important;width:"+V+"px !important;bottom:"+Q+"right:"+T+"top:"+R+"left:"+ab;m[ah].style.opacity=P;m[ah].className="visible_player";C.resizeDTK(V,ad,ah)}else{for(var ac=1;ac<=k;ac++){A[ah].push(setTimeout(function(ai){return function(){switch(D){case 1:R=B+" !important;";Q=aa+(i-aa)*ai/k;Q=Q+"px !important;";T=Z+(E-Z)*ai/k;T=T+"px !important;";ab=q+" !important;";break;case 2:R=aa+(B-aa)*ai/k;R=R+"px !important;";Q=i+" !important;";T=Z+(E-Z)*ai/k;T=T+"px !important;";ab=q+" !important;";break;case 3:R=aa+(B-aa)*ai/k;R=R+"px !important;";Q=i+" !important;";T=E+" !important;";ab=Z+(q-Z)*ai/k;ab=ab+"px !important;";break;case 4:R=B+" !important;";Q=aa+(i-aa)*ai/k;Q=Q+"px !important;";T=E+" !important;";ab=Z+(q-Z)*ai/k;ab=ab+"px !important;";break}var ak=Math.round(ae+(ae/W*n-ae)*ai/k);var al=Math.round(W+(n-W)*ai/k);var aj=0.1+(0.9)*ai/k;m[ah].style.cssText="z-index:1000;position:fixed !important;height:"+ak+"px !important;width:"+al+"px !important;bottom:"+Q+"right:"+T+"top:"+R+"left:"+ab;m[ah].style.opacity=aj;if(ai==k){m[ah].className="visible_player";m[ah].style.removeProperty("width");m[ah].style.removeProperty("opacity");m[ah].style.removeProperty("z-index");m[ah].style.removeProperty("position");m[ah].style.removeProperty("bottom");m[ah].style.removeProperty("right");m[ah].style.removeProperty("top");m[ah].style.removeProperty("left");M[ah]=0;C.resizeDTK(al,ak,ah)}}}(ac),ac))}}}else{if(f[ah]==5&&K){return}C.set_in_page_visible_player(false);for(var Y in A[ah]){clearTimeout(A[ah][Y])}ag.style.width="";ag.style.height="";if(typeof a[ah]!=="undefined"&&a[ah]!==null){m[ah].style.cssText=a[ah]}else{m[ah].style.removeProperty("height");m[ah].style.removeProperty("width");m[ah].style.removeProperty("zIndex");m[ah].style.removeProperty("position");m[ah].style.removeProperty("bottom");m[ah].style.removeProperty("right")}m[ah].style.removeProperty("opacity");m[ah].className=c[ah];M[ah]=0;t[ah]=0;U.postMessage("fb_btn_show","*");C.resizeDTK(W,ae,ah)}}else{if("undefined"!=typeof y[ah]){var S=document.getElementById(m[ah]._target+"_visible_player");if(O){C.set_in_page_visible_player(true);t[ah]=1;M[ah]=1;S.parentNode.style.width=W+"px";S.parentNode.style.height=ae+"px";S.parentNode.style.backgroundColor="black";m[ah].setVisiblePlayer(true);m[ah].showPanel(false);if(I){var ad=Math.round((n*9)/16);var V=Math.round(n);var P=1;R="auto !important;";Q="0 !important;";T="0 !important;";ab="0 !important;";S.style.cssText="z-index:1000;position:fixed !important;height:"+ad+"px !important;width:"+V+"px !important;bottom:"+Q+"right:"+T+"top:"+R+"left:"+ab;S.style.opacity=P}else{for(var ac=1;ac<=k;ac++){A[ah]=setTimeout(function(ai){return function(){switch(D){case 1:R=B+" !important;";Q=aa+(i-aa)*ai/k;Q=Q+"px !important;";T=Z+(E-Z)*ai/k;T=T+"px !important;";ab=q+" !important;";break;case 2:R=aa+(B-aa)*ai/k;R=R+"px !important;";Q=i+" !important;";T=Z+(E-Z)*ai/k;T=T+"px !important;";ab=q+" !important;";break;case 3:R=aa+(B-aa)*ai/k;R=R+"px !important;";Q=i+" !important;";T=E+" !important;";ab=Z+(q-Z)*ai/k;ab=ab+"px !important;";break;case 4:R=B+" !important;";Q=aa+(i-aa)*ai/k;Q=Q+"px !important;";T=E+" !important;";ab=Z+(q-Z)*ai/k;ab=ab+"px !important;";break}var ak=Math.round(ae+(ae/W*n-ae)*ai/k);var al=Math.round(W+(n-W)*ai/k);var aj=0.1+(0.9)*ai/k;S.style.cssText="z-index:1000;position:fixed !important;height:"+ak+"px !important;width:"+al+"px !important;bottom:"+Q+"right:"+T+"top:"+R+"left:"+ab;S.style.opacity=aj;if(ai==k){S.classList.add("visible_player");M[ah]=0;C.resizeDTK(al,ak,ah)}}}(ac),ac)}}}else{if(t[ah]){var X=document.getElementById(m[ah]._target+"_visible_player").parentNode;var af=X.offsetWidth,N=X.offsetHeight;C.set_in_page_visible_player(false);S.parentNode.style.width="";S.parentNode.style.height=N+"px";S.style.height="";S.style.width="";S.style.zIndex="";S.style.position="";S.style.bottom="";S.style.right="";S.style.opacity="";S.classList.remove("visible_player");M[ah]=0;clearTimeout(A[ah]);t[ah]=0;m[ah].setVisiblePlayer(false);C.resizeDTK(S.parentNode.offsetWidth,S.parentNode.offsetHeight,ah)}}}}}function F(N){if(typeof N.data=="string"){var Q=N.data.match(/(state_player)=(.*)_(\d+)/);var R=N.data.match(/(new_video_)(\d+)_(\d+)_(\d+)_(\d+)_(\d+)(_(\d+))?/);var P=N.data.match(/outstream_(\d+)/);if(!l&&Q){if(f[Q[3]]==5&&Q[2]!="close"){return}if(Q[1]=="state_player"){if(Q[2]=="play"){L[Q[3]]="play";for(var O=0;O=0){if(l){O.endOfVisiblePlayer=true}return}if(null==document.getElementById(O._target+"_visible_player")){m.push(O);z=m.length-1;y[z]=false;f[z]=P;var N=document.getElementById(O._target);var S=document.createElement("div");S.id=O._target+"_visible_player";var R=document.createElement("div");R.id=z+"_button_visible_player";R.className="button_visible_player";R.style.position="absolute";R.style.top="0 px";R.style.left="0 px";R.style.width="100%";R.style.height="100%";R.style.zIndex="11";R.style.display="none";R.style.cursor="pointer";N.parentNode.insertBefore(S,N);S.appendChild(N);S.parentNode.insertBefore(R,S);var Q=document.createElement("img");Q.id="close_cross";Q.style.cursor="pointer";Q.style.display="none";Q.style.position="absolute";Q.style.right="7px";Q.style.width="10px";Q.style.height="10px";Q.style.zIndex="1000";Q.style.margin="0";Q.style.top="7px";Q.style.padding="5px";Q.style.border="1px solid #fff";Q.style.borderRadius="3px";Q.style.boxSizing="content-box";Q.style.backgroundColor="rgba(0,0,0,0.6)";Q.src=O._path+"/img/widget/close.png";N.parentNode.insertBefore(Q,N);Q.onclick=function(){l=true;for(var T=0;T