!function(){var r=function(){this.cursor=0};r.HOST="https://tv-programmi.it",r.anchor="Programmi TV",r.fn=r.prototype={newId:function(){return++this.cursor},init:function(){document.querySelectorAll("a.widget-tv").forEach(function(t){var i={href:t.getAttribute("href"),type:t.getAttribute("data-type"),nbchaines:t.getAttribute("data-nb-chaines"),height:t.getAttribute("data-height")||"380px",width:t.getAttribute("data-width")||"300px",color:t.getAttribute("data-color")||""},n=i.color?"&hover_color="+encodeURIComponent(i.color):"";i.nbchaines?(i.height=25+100*i.nbchaines+"px",e="&nb_chaines="+encodeURIComponent(i.nbchaines)):e="",r.HOST==i.href&&r.anchor==t.text&&this.build(t,r.HOST+"/widget.php?type="+i.type+n+e,i)}.bind(this))},build:function(t,e,i){var n=document.createElement("iframe");n.setAttribute("id","widget-tv-"+this.newId()),n.setAttribute("src",e),n.setAttribute("style","overflow: hidden; position: static; visibility: visible; display: inline-block; width: "+i.width+"; height: "+i.height+"; padding: 0px; border: none; max-width: 100%; min-width: 300px; margin-top: 0px; margin-bottom: 0px; min-height: 200px;"),n.setAttribute("scrolling","no"),n.setAttribute("frameBorder","0"),n.setAttribute("allowTransparency","true"),n.setAttribute("allowFullscreen","true"),t.parentNode.replaceChild(n,t)}},window.Widget=r}();var widget=new Widget;window.onload=widget.init.bind(widget);