var vb={assets_root: "http://omroep.vara.nl/fileadmin/static/varabalk/images/",css_root: "http://omroep.vara.nl/fileadmin/static/varabalk/css/",js_root:"http://omroep.vara.nl/fileadmin/static/varabalk/js/",allProgramsAndSites: [{title:"Afslag Thunder Road",url:"http://omroep.vara.nl/Afslag-Thunder-Road.4008.0.html",radioChannelIndex:5},{title:"Biografie VARA",url:"http://omroep.vara.nl/Biografie-VARA.5318.0.html",isWebsite:true},{title:"Blikvoer.tv",url:"http://omroep.vara.nl/Blikvoer-tv.4194.0.html",isWebsite:true},{title:"Buitenhof",url:"http://omroep.vara.nl/Buitenhof.1434.0.html",tvChannelIndex:0},{title:"Claudia d'r Op",url:"http://omroep.vara.nl/Claudia-d-r-Op.817.0.html",radioChannelIndex:2},{title:"Comedy Corner",url:"http://omroep.vara.nl/Comedy-Corner.6544.0.html",tvChannelIndex:2},{title:"Componist van de Week",url:"http://omroep.vara.nl/Componist-van-de-Week.1078.0.html",radioChannelIndex:3},{title:"Consumenten24",url:"http://omroep.vara.nl/Consumenten24.4413.0.html",tvChannelIndex:3},{title:"De Heer Ontwaakt",url:"http://omroep.vara.nl/De-Heer-Ontwaakt.3597.0.html",radioChannelIndex:1},{title:"De Leeuw op Zondag",url:"http://omroep.vara.nl/De-Leeuw-op-Zondag.6543.0.html",tvChannelIndex:0},{title:"De n8 klinkt andrs",url:"http://omroep.vara.nl/De-n8-klinkt-andrs.5799.0.html",radioChannelIndex:0},{title:"De Onrendabelen",url:"http://omroep.vara.nl/De-Onrendabelen.5741.0.html",tvChannelIndex:1},{title:"De Smurfen",url:"http://omroep.vara.nl/De-Smurfen.5796.0.html",tvChannelIndex:2},{title:"De VARA Presenteert Comedytrain",url:"http://omroep.vara.nl/De-VARA-Presenteert-Comedytrai.6490.0.html",tvChannelIndex:2},{title:"De Wereld Draait Door",url:"http://omroep.vara.nl/De-Wereld-Draait-Door.1417.0.html",tvChannelIndex:2},{title:"Deadline",url:"http://omroep.vara.nl/Deadline.6146.0.html",tvChannelIndex:0},{title:"Eigen Schuld Dikke Bult",url:"http://omroep.vara.nl/Eigen-Schuld-Dikke-Bult.5706.0.html",tvChannelIndex:1},{title:"Evenblij met...",url:"http://omroep.vara.nl/Evenblij-met.4552.0.html",tvChannelIndex:0},{title:"Films bij de VARA",url:"http://omroep.vara.nl/Films-bij-de-VARA.4550.0.html",tvChannelIndex:2},{title:"For the Record",url:"http://omroep.vara.nl/For-the-Record.1000.0.html",radioChannelIndex:1},{title:"Gebak van Krul",url:"http://omroep.vara.nl/Gebak-van-Krul.3722.0.html",tvChannelIndex:0},{title:"GIEL",url:"http://omroep.vara.nl/GIEL.1013.0.html",radioChannelIndex:2},{title:"Giel Jazz ",url:"http://omroep.vara.nl/Giel-Jazz.6094.0.html",radioChannelIndex:5},{title:"Het Circus Jeroen Bosch",url:"http://omroep.vara.nl/Het-Circus-Jeroen-Bosch.4383.0.html",radioChannelIndex:1},{title:"Hollands Humeur",url:"http://omroep.vara.nl/Hollands-Humeur.5624.0.html",isWebsite:true},{title:"HumorTV op 3",url:"http://omroep.vara.nl/HumorTV-op-3.4371.0.html",tvChannelIndex:2},{title:"HumorTV.nl",url:"http://omroep.vara.nl/HumorTV-nl.4195.0.html",isWebsite:true},{title:"HumorTV24",url:"http://omroep.vara.nl/HumorTV24.4192.0.html",tvChannelIndex:3},{title:"JobHop week",url:"http://omroep.vara.nl/JobHop-week.6284.0.html",radioChannelIndex:0},{title:"Joop",url:"http://omroep.vara.nl/Joop.5667.0.html",isWebsite:true},{title:"Kassa",url:"http://omroep.vara.nl/Kassa.1437.0.html",tvChannelIndex:0},{title:"Kinderen Geen Bezwaar",url:"http://omroep.vara.nl/Kinderen-Geen-Bezwaar.1173.0.html",tvChannelIndex:0},{title:"Kinderen voor Kinderen",url:"http://omroep.vara.nl/Kinderen-voor-Kinderen.1186.0.html",tvChannelIndex:2},{title:"Kinderen voor Kinderen Karaoke",url:"http://omroep.vara.nl/Kinderen-voor-Kinderen-Karaoke.4468.0.html",isWebsite:true},{title:"Law & Order",url:"http://omroep.vara.nl/Law-Order.2175.0.html",tvChannelIndex:2},{title:"Liedkunst.nl",url:"http://omroep.vara.nl/Liedkunst-nl.5587.0.html",tvChannelIndex:3},{title:"Nachtegiel",url:"http://omroep.vara.nl/Nachtegiel.1052.0.html",radioChannelIndex:2},{title:"Nieuwslicht",url:"http://omroep.vara.nl/Nieuwslicht.6089.0.html",tvChannelIndex:2},{title:"NOVA",url:"http://omroep.vara.nl/NOVA.1225.0.html",tvChannelIndex:1},{title:"Olympische Spelen 2010",url:"http://omroep.vara.nl/Olympische-Spelen-2010.6251.0.html",isWebsite:true},{title:"Ombudsman",url:"http://omroep.vara.nl/Ombudsman.5460.0.html",tvChannelIndex:1},{title:"Onjo",url:"http://omroep.vara.nl/Onjo.4196.0.html",isWebsite:true},{title:"Op weg naar het Lagerhuis",url:"http://omroep.vara.nl/Op-weg-naar-het-Lagerhuis.6021.0.html",tvChannelIndex:2},{title:"Over de Schutting",url:"http://omroep.vara.nl/Over-de-Schutting.1065.0.html",radioChannelIndex:0},{title:"Pauw & Witteman",url:"http://omroep.vara.nl/Pauw-Witteman.1251.0.html",tvChannelIndex:0},{title:"Per Seconde Wijzer",url:"http://omroep.vara.nl/Per-Seconde-Wijzer.1264.0.html",tvChannelIndex:1},{title:"Pianistenuur",url:"http://omroep.vara.nl/Pianistenuur.2420.0.html",radioChannelIndex:3},{title:"Programma-archief",url:"http://omroep.vara.nl/Programma-archief.6009.0.html",isWebsite:true},{title:"QI",url:"http://omroep.vara.nl/QI.3762.0.html",tvChannelIndex:2},{title:"Radio Kassa",url:"http://omroep.vara.nl/Radio-Kassa.1117.0.html",radioChannelIndex:0},{title:"Robbert-Jan",url:"http://omroep.vara.nl/Robbert-Jan.3040.0.html",radioChannelIndex:2},{title:"Spijkers met koppen",url:"http://omroep.vara.nl/Spijkers-met-koppen.6100.0.html",radioChannelIndex:1},{title:"Spooks",url:"http://omroep.vara.nl/Spooks.1688.0.html",tvChannelIndex:2},{title:"Stenders Eetvermaak",url:"http://omroep.vara.nl/Stenders-Eetvermaak.6318.0.html",radioChannelIndex:2},{title:"Sweet Soul Music",url:"http://omroep.vara.nl/Sweet-Soul-Music.5208.0.html",radioChannelIndex:5},{title:"The Best of 2night",url:"http://omroep.vara.nl/The-Best-of-2night.5209.0.html",radioChannelIndex:1},{title:"TV Programma Archief",url:"http://omroep.vara.nl/TV-Programma-Archief.6093.0.html",tvChannelIndex:0},{title:"Twee voor Twaalf",url:"http://omroep.vara.nl/Twee-voor-Twaalf.4418.0.html",tvChannelIndex:1},{title:"Van Zon op Zaterdag",url:"http://omroep.vara.nl/Van-Zon-op-Zaterdag.4430.0.html",tvChannelIndex:0},{title:"VARA's Comedy Corner",url:"http://omroep.vara.nl/VARA-s-Comedy-Corner.5080.0.html",tvChannelIndex:2},{title:"VARAgids",url:"http://omroep.vara.nl/VARAgids.4335.0.html",isWebsite:true},{title:"VARAshop",url:"http://omroep.vara.nl/VARAshop.4388.0.html",isWebsite:true},{title:"Volgende Vraag",url:"http://omroep.vara.nl/Volgende-Vraag.5928.0.html",tvChannelIndex:1},{title:"Vroege Vogels",url:"http://omroep.vara.nl/Vroege-Vogels.1637.0.html",radioChannelIndex:0},{title:"Vroege Vogels TV",url:"http://omroep.vara.nl/Vroege-Vogels-TV.2422.0.html",tvChannelIndex:1},{title:"WaarKomtHetVandaan",url:"http://omroep.vara.nl/WaarKomtHetVandaan.4483.0.html",isWebsite:true},{title:"Welkom in Nederland",url:"http://omroep.vara.nl/Welkom-in-Nederland.4416.0.html",tvChannelIndex:1},{title:"X de Leeuw",url:"http://omroep.vara.nl/X-de-Leeuw.6366.0.html",tvChannelIndex:0},{title:"ZEMBLA",url:"http://omroep.vara.nl/ZEMBLA.1303.0.html",tvChannelIndex:1}],videos: [{title:"Waylon covert Cash!",source:"Giel",date:"di 16 mrt",img:"http://omroep.vara.nl/typo3temp/pics/abf70e4662.jpg",url:"http://giel.vara.nl/Mega-Top-50-Covers.821.0.html?&tx_ttnews[tt_news]=13218&tx_ttnews[backPid]=244&cHash=a22a6e5d51"},{title:"Vadertje Rouvoet",source:"Pauw & Witteman",date:"di 16 mrt",img:"http://omroep.vara.nl/typo3temp/pics/bf725e85d8.jpg",url:"http://omroep.vara.nl/Uitzending-gemist.uitzending_gemist.0.html?&aflID=10751198&programma=41&cHash=a0ae2f3cab&start=0:1:30&end=0:7:06"},{title:"De Lullo's live aan tafel",source:"De Wereld Draait Door",date:"di 16 mrt",img:"http://omroep.vara.nl/typo3temp/pics/a814a44627.jpg",url:"http://omroep.vara.nl/Uitzending-gemist.uitzending_gemist.0.html?&aflID=10755518&cHash=23019cd6ed&start=0:42:57&end=0:48:14"},{title:"Sieneke versus Tom Dice",source:"De Leeuw op Zondag",date:"ma 15 mrt",img:"http://omroep.vara.nl/typo3temp/pics/81d0680667.jpg",url:"http://humortv.vara.nl/pa.342540.belgie-gaat-het-songfestival-winnen.html"},{title:"Sneak Preview van Deadline!",source:"Deadline",date:"ma 15 mrt",img:"http://omroep.vara.nl/typo3temp/pics/2f5f547021.jpg",url:"http://omroep.vara.nl/Vooruit.6165.0.html"}],news: [{title:"Win het boek 'Pil' van Mike Boddé",source:"HumorTV",date:"di 16 mrt",img:"http://omroep.vara.nl/typo3temp/pics/3472b9fb97.jpg",url:"http://humortv.vara.nl/pg.1103.maak-kans-op-het-boek-pil-van-mike-bodde.html"},{title:"Wil jij het album van Giovanca?",source:"De Wereld Draait Door",date:"di 16 mrt",img:"http://omroep.vara.nl/typo3temp/pics/e9410f2fa3.jpg",url:"http://dewerelddraaitdoor.vara.nl/index.php?id=1305"},{title:"'Deadline' in High Quality!",source:"Deadline",date:"di 16 mrt",img:"http://omroep.vara.nl/typo3temp/pics/ce225b4de2.jpg",url:"http://omroep.vara.nl/HQ-gemist.6504.0.html?&tx_ttnews[tt_news]=23243&tx_ttnews[backPid]=6241&cHash=a5e6e64e75"},{title:"Gratis Kraanwater!",source:"Kassa",date:"ma 15 mrt",img:"http://omroep.vara.nl/typo3temp/pics/277d6472e9.jpg",url:"http://kassa.vara.nl/actueel/dossiers/dossier/dossier/4789910/?&cHash=5265489d88"},{title:"Vragen aan de cast",source:"Kinderen Geen Bezwaar",date:"za 13 mrt",img:"http://omroep.vara.nl/typo3temp/pics/755832d2ec.jpg",url:"http://omroep.vara.nl/Jouw-vraag-aan-de-cast.5807.0.html"}],wordlid: {header: "De voordelen van VARA-lidmaatschap",intro: "",list: ["Met uw steun meer goede programma's als DWDD, Mooi! Weer de Leeuw en Kassa","Toegang tot VARA-programmas en evenementen","Keuze uit mooie cadeaus bij aanmelding"],wordlid_url:"http://weesverschillig.vara.nl",meerinfo_url:"http://omroep.vara.nl/Voordelen-VARA-leden.213.0.html",img:"http://omroep.vara.nl/typo3temp/pics/0ac12cfc43.jpg"},



tvChannels:[{id:"ned1",title:"Nederland 1",cname:"vb_ned1"},{id:"ned2",title:"Nederland 2",cname:"vb_ned2"},{id:"ned3",title:"Nederland 3",cname:"vb_ned3"},{id:"themakanaal",title:"Themakanalen",cname:"vb_themakanaal"}],radioChannels:[{id:"radio1",title:"Radio 1",cname:"vb_radio1"},{id:"radio2",title:"Radio 2",cname:"vb_radio2"},{id:"radio3",title:"3fm",cname:"vb_radio3"},{id:"radio4",title:"Radio 4",cname:"vb_radio4"},{id:"radio5",title:"Radio 5",cname:"vb_radio5"},{id:"radio6",title:"Radio 6",cname:"vb_radio6"}],version:"1.1.0",date:"20090813",overlay:null,overlayOpacity:'0.6',progLink:null,videoLink:null,actueelLink:null,wordlidLink:null,currLink:null,progWindow:null,videoWindow:null,newsWindow:null,wordlidWindow:null,currWindow:null,jQueryMinVersion:"1.3.2",menuDelay:350,siteClass:"vb_siteClass",lastScrollLeft:0,initJQueryDependentStarted:false,floatfixerHTML:'<div class="vb_floatfixer"></div>',moreLinks:{programsAndSites:{url:"http://www.vara.nl/programmasensites/",title:null},video:{url:"http://sitebites.vara.nl/",title:"sitebites.VARA.nl"},actueel:{url:"http://www.vara.nl/",title:"VARA.nl"},wordlid:{url:"http://weesverschillig.vara.nl/",title:null}},createMainbar:function(){var body=document.getElementsByTagName("body")[0];var vbdiv=document.createElement("div");vbdiv.style.display="none";vbdiv.id="vb";body.insertBefore(vbdiv,body.firstChild);var ph=document.createElement("div");ph.style.height="29px";ph.style.backgroundColor="#222";ph.id="vb_placeholder";body.insertBefore(ph,body.firstChild);var h='<div id="vb_mainbar">';h+='<div id="vb_wrapper1"><div id="vb_wrapper2">';if(typeof(vb_isNps)!="undefined"&&vb_isNps===true){h+='<div id="vb_npslogo"><a href="http://www.nps.nl" title="naar nps.nl"><img src="'+vb.assets_root+'vb_npslogo.gif" width="23" height="23" alt="npslogo" /></a></div>';}
h+='<div id="vb_varalogo"><a href="http://www.vara.nl" title="naar Vara.nl"><img src="'+vb.assets_root+'vb_varalogo.gif" width="77" height="23" alt="varalogo" /></a></div>';h+='<ul id="vb_secties">';h+='<li id="vb_programmas">';var url=vb.moreLinks.programsAndSites.url;if(url===null){url="#";}
h+='<h4><a href="'+url+'"><span>Programma\'s en Sites</span></a></h4>';h+='</li>';h+='<li id="vb_videos">';url=vb.moreLinks.video.url;if(url===null){url="#";}
var title=vb.trim(vb.videos[0].title,25);h+='<h4><a href="'+url+'"><span>Zien: <strong>'+title+'</strong></span></a></h4>';h+='</li>';h+='<li id="vb_actueel">';url=vb.moreLinks.actueel.url;if(url===null){url="#";}
title=vb.trim(vb.news[0].title,30);h+='<h4><a href="'+url+'"><span>Nieuws: <strong>'+title+'</strong></span></a></h4>';h+='</li>';h+='<li id="vb_wordlid">';url=vb.moreLinks.wordlid.url;if(url===null){url="#";}
h+='<h4><a href="'+url+'"><span><strong>Word Lid!</strong></span></a></h4>';h+='</li>';h+='</ul>';h+=vb.floatfixerHTML;h+='</div></div>';h+='</div>';document.getElementById("vb").innerHTML+=h;},initMainbar:function(){vb.progLink=jQuery("#vb_programmas a")[0];vb.videoLink=jQuery("#vb_videos a")[0];vb.actueelLink=jQuery("#vb_actueel a")[0];vb.wordlidLink=jQuery("#vb_wordlid a")[0];vb.progLink.win=vb.progWindow;vb.videoLink.win=vb.videoWindow;vb.actueelLink.win=vb.actueelWindow;vb.wordlidLink.win=vb.wordlidWindow;jQuery("#vb_mainbar li a").mouseenter(function(e){clearTimeout(vb.listLeaveHideTimer);var link=e.target.parentNode;if(link.nodeName.toLowerCase()!="a"){link=link.parentNode;}
var win=link.win;vb.currLink=link;vb.currWindow=win;clearTimeout(vb.showTimer);vb.showTimer=setTimeout(vb.open,vb.menuDelay);jQuery(e.target).mouseleave(function(){clearTimeout(vb.showTimer);});});var a=document.getElementById("vb_mainbar").getElementsByTagName("ul")[0].getElementsByTagName("a");for(var i=0;i<a.length;i++){a[i].href="#";a[i].onclick="return false;";}},createOverlay:function(){jQuery("#vb").prepend('<div id="vb_overlay"/>');vb.overlay=jQuery("#vb_overlay");vb.overlay.css('opacity',vb.overlayOpacity);jQuery(vb.overlay).click(function(){vb.close();});},createProgramsAndSitesContainer:function(){var h='<div id="vb_progcontainer" class="vb_window">';h+=vb.closelinkHTML;h+='<h3>';var url=vb.moreLinks.programsAndSites.url;if(url){h+='<a href="'+url+'">';}
h+='Alle programma\'s en websites van de VARA';if(url){h+='</a>';}
h+='</h3>';h+='<div id="vb_progsets" class="vb_windowcontent"></div>';h+='<div class="vb_footer">';h+='<div id="vb_typefilter">';h+='<h5>Toon:</h5>';h+='<ul>';var tvClass="";var radioClass="";for(var i=0;i<vb.tvChannels.length;i++){if(i>0){tvClass+=" ";}
tvClass+=vb.tvChannels[i].cname;}
for(i=0;i<vb.radioChannels.length;i++){if(i>0){radioClass+=" ";}
radioClass+=vb.radioChannels[i].cname;}
h+='<li class="vb_first vb_showall"><a class="vb_active" href="#">Alles</a></li>';h+='<li class="'+tvClass+'"><a href="#" title="Toon alleen TV-programma\'s">TV</a></li>';h+='<li class="'+radioClass+'"><a href="#" title="Toon alleen radio-programma\'s">Radio</a></li>';h+='<li class="'+vb.siteClass+'"><a href="#" title="Toon alleen websites">Websites</a></li>';h+='</ul>';h+='</div>';h+='<div id="vb_tvChannels">';h+='<h5>TV-zenders:</h5>';h+='<ul>';for(i=0;i<vb.tvChannels.length;i++){h+='<li class="'+vb.tvChannels[i].cname+'"><a href="#" title="Toon alleen '+vb.tvChannels[i].title+'"><img src="'+vb.assets_root+'spacer.gif" alt="'+vb.tvChannels[i].title+'" /></a></li>';}
h+='</ul>';h+='</div>';h+='<div id="vb_radioChannels">';h+='<h5>Radio-zenders:</h5>';h+='<ul>';for(i=0;i<vb.radioChannels.length;i++){h+='<li class="'+vb.radioChannels[i].cname+'"><a href="#" title="Toon alleen '+vb.radioChannels[i].title+'"><img src="'+vb.assets_root+'spacer.gif" alt="'+vb.radioChannels[i].title+'" /></a></li>';}
h+='</ul>';h+='</div>';h+=vb.floatfixerHTML;h+='</div>';h+='</div>';jQuery("#vb").append(h);vb.createProgs();vb.addFilters();vb.progWindow=jQuery("#vb_progcontainer");},createProgs:function(){var numItems=vb.allProgramsAndSites.length;var itemsPerColumn=Math.ceil(numItems/4);var currItem=0;var currInitial="";var lastInitial="";for(var col=0;col<4;col++){var h='<ol class="vb_progset">';var row=0;while(row<itemsPerColumn&&currItem<(numItems-1)){currItem=col*itemsPerColumn+row;var currOb=vb.allProgramsAndSites[currItem];var c="";var tvChannelIndex=currOb.tvChannelIndex;if(tvChannelIndex!==undefined&&vb.tvChannels[tvChannelIndex]){var tvClass="vb_"+vb.tvChannels[tvChannelIndex].id;c=vb.addClassToClassName(c,tvClass);}
var radioChannelIndex=currOb.radioChannelIndex;if(radioChannelIndex!==undefined&&vb.radioChannels[radioChannelIndex]){var radioClass="vb_"+vb.radioChannels[radioChannelIndex].id;c=vb.addClassToClassName(c,radioClass);}
if(currOb.isWebsite&&currOb.isWebsite===true){c=vb.addClassToClassName(c,vb.siteClass);}
var url=currOb.url;var a=document.createElement("a");a.setAttribute("href",url);var currTitle=currOb.title;currInitial=currTitle.charAt(0).toLowerCase();var liId='';if(currInitial!=lastInitial){lastInitial=currInitial;liId=' id="vb_'+currInitial+'"';c=vb.addClassToClassName(c,"vb_first_char");}
h+='<li class="'+c+'"'+liId+'><a href="'+url+'">'+currTitle+'</a></li>';row++;}
h+='</ol>';jQuery("#vb_progsets").append(h);}
jQuery("#vb_progsets").append(vb.floatfixerHTML);},addFilters:function(){jQuery("#vb_progcontainer .vb_footer li a").each(function(i){var li;jQuery(this).mouseenter(function(e){vb.clearResetTimeout();li=e.target;while(li.nodeName.toLowerCase()!="li"){li=li.parentNode;}
var cls=jQuery(li).attr("class");vb.filterProgs(cls);jQuery(this).bind("mouseleave",vb.setResetTimeout);});jQuery(this).click(function(e){jQuery(this).unbind("mouseleave",vb.setResetTimeout);var a=li.firstChild;jQuery(li).css("background: #f90;");jQuery(a).addClass("vb_active");return false;});});},createVideoContainer:function(){var n=vb.news;if(n&&n.length>0){var h='<div id="vb_videocontainer" class="vb_window">';h+=vb.closelinkHTML;var url=vb.moreLinks.video.url;var title=vb.moreLinks.video.title;h+='<h3>';if(url){h+='<a href="'+url+'" title="Meer video: '+title+'">';}
h+='VARA Video\'s';if(url){h+='</a>';}
h+='</h3>';h+='<div id="vb_videocontent" class="vb_windowcontent">';h+=vb.createVideoOrActueelList(vb.videos,true);h+='</div>';if(url&&title){h+='<div class="vb_footer">';h+='<a href="'+url+'">meer video: <strong>'+title+'</strong></a>';h+='</div>';}
h+='</div>';jQuery("#vb").append(h);vb.videoWindow=jQuery("#vb_videocontainer");}},createActueelContainer:function(){var n=vb.news;if(n&&n.length>0){var h='<div id="vb_actueelcontainer" class="vb_window">';h+=vb.closelinkHTML;var url=vb.moreLinks.actueel.url;var title=vb.moreLinks.actueel.title;h+='<h3>';if(url){h+='<a href="'+url+'" title="Meer actueel: '+title+'">';}
h+='VARA Nieuws';if(url){h+='</a>';}
h+='</h3>';h+='<div id="vb_actueelcontent" class="vb_windowcontent">';h+=vb.createVideoOrActueelList(vb.news);h+='</div>';if(url&&title){h+='<div class="vb_footer">';h+='<a href="'+url+'">meer actueel: <strong>'+title+'</strong></a>';h+='</div>';}
h+='</div>';jQuery("#vb").append(h);vb.actueelWindow=jQuery("#vb_actueelcontainer");}},createVideoOrActueelList:function(ob,isVideo){var h='<ul>';for(var i=0;i<ob.length;i++){var title=ob[i].title;var url=ob[i].url;var img=ob[i].img;var src=ob[i].source;var date=ob[i].date;if(title&&url){h+='<li onclick="vb.triggerChildLink(this);">';if(img){h+='<a href="'+url+'" class="vb_still" onclick="return false;">';}
if(isVideo){h+='<span class="vb_playbutton"></span>';}
h+='<img src="'+img+'" alt="" /></a>';if(src||date){h+='<h5><a href="'+url+'" onclick="return false;">';if(src){h+='<span class="source">'+src+'</span>';}
if(date){h+='<span class="date">'+date+'</span>';}
h+='</a></h5>';}
h+='<h4><a href="'+url+'" onclick="return false;">'+title+'</a></h4>';h+=vb.floatfixerHTML;h+='</li>';}}
h+='</ul>';return(h);},createWordlidContainer:function(){var h='<div id="vb_wordlidcontainer" class="vb_window">';h+=vb.closelinkHTML;var url=vb.moreLinks.wordlid.url;h+='<h3>';if(url){h+='<a href="'+url+'">';}
h+='Word lid';if(url){h+='</a>';}
h+='</h3>';h+='<div id="vb_wordlidcontent" class="vb_windowcontent">';h+='<h4>'+vb.wordlid.header+'</h4>';if(vb.wordlid.intro!==""){h+='<p>'+vb.wordlid.intro+'</p>';}
if(vb.wordlid.list instanceof Array&&vb.wordlid.list.length>0){h+='<ul>';for(var i=0;i<vb.wordlid.list.length;i++){h+='<li>'+vb.wordlid.list[i]+'</li>';}
h+='</ul>';}
h+='<a href="'+vb.wordlid.wordlid_url+'" id="vb_wordlidlink">Word nu Lid!</a>';if(vb.wordlid.meerinfo_url!==""){h+='<a href="'+vb.wordlid.meerinfo_url+'" class="weak">Meer informatie</a>';}
if(vb.wordlid.img!==""){h+='<div id="vb_wordlidcadeaus"><img src="'+vb.wordlid.img+'" alt="" /></div>';}
h+='</div>';h+='<div class="vb_footer">';h+='</div>';h+='</div>';jQuery("#vb").append(h);vb.wordlidWindow=jQuery("#vb_wordlidcontainer");},addSkiplink:function(){var v=jQuery("#vb");v.prepend('<div id="vb_skip"><a href="#vb_end">Direct naar hoofdmenu</a></div>');v.append('<a name="vb_end"/>');},initCloseLinks:function(){jQuery(".vb_close a").click(function(e){e.preventDefault();vb.close();});},open:function(){vb.setProblemObjectsVisibility(false);vb.showOverlay();var link=vb.currLink;jQuery("#vb_mainbar li a").each(function(i){var win=this.win;if(this==link){jQuery(this).addClass("vb_active");vb.showWindow(win);jQuery(this).mouseleave(function(){clearTimeout(vb.listLeaveHideTimer);vb.listLeaveHideTimer=setTimeout(vb.close,500);});jQuery(win).mouseenter(function(){clearTimeout(vb.listLeaveHideTimer);jQuery(this).mouseleave(function(){clearTimeout(vb.windowLeaveHideTimer);vb.windowLeaveHideTimer=setTimeout(vb.close,500);});});}else{jQuery(this).removeClass("vb_active");vb.hideWindow(win);}});},close:function(){jQuery("#vb_mainbar li a").each(function(i){jQuery(this).removeClass("vb_active");this.blur();vb.hideWindow(this.win);});vb.hideOverlay();vb.setProblemObjectsVisibility(true);jQuery(vb.currLink).removeClass("vb_active");vb.resetProgs();},showWindow:function(win){win.css("top","30px");},hideWindow:function(win){clearTimeout(vb.listLeaveHideTimer);clearTimeout(vb.windowLeaveHideTimer);win.css("top","-1000px");},showOverlay:function(){if(vb.overlay.css("display")=="none"||(parseFloat(vb.overlay.css('opacity'))<parseFloat(vb.overlayOpacity))){vb.resizeOverlay();jQuery(vb.overlay).fadeIn("fast");jQuery(window).bind('resize.vb',function(){vb.resizeOverlay();});}},hideOverlay:function(){jQuery(vb.overlay).fadeOut("fast");jQuery(window).unbind('resize.vb');},setProblemObjectsVisibility:function(visible){var vis=(visible===false)?"hidden":"visible";jQuery("select,iframe").each(function(){jQuery(this).css("visibility",vis);});jQuery("embed").each(function(){var change=true;var wmode=jQuery(this).attr("wmode");if(typeof(wmode)!="undefined"){wmode=wmode.toLowerCase();if(wmode=="opaque"||wmode=="transparent"){if(!jQuery.browser.safari){change=false;}}}
if(change){jQuery(this).css("visibility",vis);}});jQuery("object").each(function(){var change=true;jQuery("param",this).each(function(){var nm=jQuery(this).attr("name");if(typeof(nm)!="undefined"&&nm.toLowerCase()=="wmode"){var val=jQuery(this).attr("value");if(typeof(val)!="undefined"){val=val.toLowerCase();if(val=="opaque"||val=="transparent"){if(!jQuery.browser.safari){change=false;}}}}});if(change){jQuery(this).css("visibility",vis);}});},setResetTimeout:function(){vb.clearResetTimeout();vb.resetTimer=setTimeout(vb.resetProgs,300);},clearResetTimeout:function(){clearTimeout(vb.resetTimer);},resetProgs:function(){vb.removeProgClasses();vb.resetFilters();},removeProgClasses:function(){jQuery(".vb_progset li a").each(function(){jQuery(this).removeClass("vb_active");jQuery(this).removeClass("vb_inactive");});},filterProgs:function(cls){vb.removeFilterClasses();if(cls.indexOf("vb_showall")>-1){vb.removeProgClasses();return;}
jQuery(".vb_progset li a").each(function(){jQuery(this).removeClass("vb_active");jQuery(this).addClass("vb_inactive");});var fstring="";if(cls.indexOf(" ")>-1){var clsArr=cls.split(" ");for(var i=0;i<clsArr.length;i++){if(i>0){fstring+=", ";}
fstring+=".vb_progset li."+clsArr[i]+" a";}}else{fstring+=".vb_progset li."+cls+" a";}
jQuery(fstring+".vb_inactive").removeClass("vb_inactive");jQuery(fstring).addClass("vb_active");},resetFilters:function(){vb.removeFilterClasses();jQuery(".vb_showall a").addClass("vb_active");},removeFilterClasses:function(){jQuery("#vb_progcontainer .vb_footer li a").each(function(){jQuery(this).removeClass("vb_active");jQuery(this).removeClass("vb_inactive");});},resizeHandler:function(){vb.setIE6MinWidth();vb.positionWindows();},scrollHandler:function(){var scrL=jQuery(window).scrollLeft();if(scrL!=vb.lastScrollLeft){clearTimeout(vb.scrollTimer);vb.scrollTimer=setTimeout(vb.positionWindows,20);vb.lastScrollLeft=scrL;}},resizeOverlay:function(){var htmlHeight=jQuery('html').get(0).clientHeight;var htmlScrollHeight=jQuery('html').get(0).scrollHeight;var bodyScrollHeight=jQuery('body').get(0).scrollHeight;var newHeight=Math.max(htmlHeight,Math.max(htmlScrollHeight,bodyScrollHeight));jQuery('#vb_overlay').css("height",newHeight+"px");jQuery('#vb_overlay').css("width",vb.getWindowMaxWidth()+"px");jQuery('#vb_overlay').css("top","0px");},positionWindows:function(){vb.positionWindow(vb.progLink);vb.positionWindow(vb.videoLink);vb.positionWindow(vb.actueelLink,true);vb.positionWindow(vb.wordlidLink,true);},positionWindow:function(link,right){var htmlWidth=vb.getWindowMinWidth();var winWidth=jQuery(link.win).width();if(winWidth===0){setTimeout(function(){vb.positionWindow(link,right);},10);return;}
var x=vb.findPosX(link)-11;if(!right&&(x+winWidth)>htmlWidth){x=(htmlWidth-winWidth)/2;}
if(right){var scrL=jQuery(window).scrollLeft();var w=winWidth-22;x=x+link.offsetWidth-w;if((x+winWidth)>(htmlWidth+scrL)){x=htmlWidth-winWidth+scrL;}}
link.win.css("left",x);},setIE6MinWidth:function(){if(vb.isIE6()){var minWidth=jQuery("#vb").css("min-width");if(minWidth===undefined){minWidth="960px";}
minWidth=parseInt(minWidth.substring(0,minWidth.length-2),10)+5;jQuery("#vb").css("width",Math.max(minWidth,vb.getWindowMaxWidth())+"px");}},trim:function(str,max,limiter){if(str.length<=max){return(str);}
if(!limiter){limiter="...";}
var arr=str.split(" ");var newstr=arr[0];if(newstr.length>max){newstr=newstr.substr(0,max);}else{for(var i=1;i<arr.length;i++){if((newstr.length+arr[i].length)<max){newstr+=" "+arr[i];}else{break;}}
newstr+=limiter;}
return(newstr);},getWindowMaxWidth:function(){var htmlWidth=jQuery('html').get(0).clientWidth;var htmlScrollWidth=jQuery('html').get(0).scrollWidth;return(Math.max(htmlScrollWidth,htmlWidth));},getWindowMinWidth:function(){var htmlWidth=jQuery('html').get(0).clientWidth;var htmlScrollWidth=jQuery('html').get(0).scrollWidth;return(Math.min(htmlScrollWidth,htmlWidth));},triggerChildLink:function(el){var link=el.getElementsByTagName("a")[0];if(link.href.indexOf("http://player.omroep.nl")==-1){window.location=link.href;}else{vb.openNeboPlayer(link);return false;}},isIE6:function(){return(jQuery.browser.msie&&Number(jQuery.browser.version)>=6&&Number(jQuery.browser.version)<7);},addClassToClassName:function(curr,cls){if(curr===null||curr===""){curr=cls;}else{curr+=" "+cls;}
return(curr);},findPosX:function(obj){var curleft=0;if(obj.offsetParent){while(1){curleft+=obj.offsetLeft;if(!obj.offsetParent){break;}
obj=obj.offsetParent;}}else if(obj.x){curleft+=obj.x;}
return curleft;},openNeboPlayer:function(url){var width=740;var height=520;var day=new Date();var id=day.getTime();var props=",toolbar=0, scrollbars=0, location=0, statusbar=0, menubar=0, resizable=yes";var marginLeft=(screen.width)?(screen.width-width)/2:100;props+=", left="+marginLeft;var marginTop=(screen.height)?(screen.height-height)/3:50;props+=", top="+marginTop;vb["page"+id]=window.open(url,id,"width="+width+", height="+height+props);},parseVersionString:function(str){if(typeof(str)!='string'){return false;}
var x=str.split('.');var maj=parseInt(x[0],10)||0;var min=parseInt(x[1],10)||0;var pat=parseInt(x[2],10)||0;return{major:maj,minor:min,patch:pat};},isMinimalVersion:function(currVersion,minVersion){var curr=vb.parseVersionString(currVersion);var min=vb.parseVersionString(minVersion);return(curr.major>=min.major&&curr.minor>=min.minor&&curr.patch>=min.patch);},handleProgramExceptions:function(){var a=vb.allProgramsAndSites;for(var i=a.length-1;i>=0;i--){if(a[i].title.toLowerCase()=="vroege vogels tv"){for(var j=a.length-1;j>=0;j--){if(a[j].title.toLowerCase()=="vroege vogels"){a[j].tvChannelIndex=a[i].tvChannelIndex;break;}}
a.splice(i,1);break;}}},includeJs:function(script_name,onloadAction){var head_element=document.getElementsByTagName('head').item(0);var js=document.createElement('script');js.setAttribute('language','javascript');js.setAttribute('type','text/javascript');js.setAttribute('src',script_name);if(onloadAction){js.onload=onloadAction;js.onreadystatechange=function(){if(js.readyState=="loaded"||js.readyState=="complete"){setTimeout(onloadAction,0);}};}
head_element.appendChild(js);return false;},includeCss:function(url){var html_doc=document.getElementsByTagName('head').item(0);var stylesheet=document.createElement('link');stylesheet.setAttribute('rel','stylesheet');stylesheet.setAttribute('href',url);stylesheet.setAttribute('type','text/css');stylesheet.setAttribute('media','screen');stylesheet.setAttribute('charset','utf-8');html_doc.appendChild(stylesheet);return false;},includeIE6Css:function(){if(vb.isIE6()){vb.includeCss(vb.css_root+"varabalk_ie6.css");}},addNpoMenu:function(){var h='<div id="npo_button_container" class="npo_button_dol">';h+='<a href="http://www.omroep.nl/">Ontdek Omroep.nl</a>';h+='</div>';jQuery("#vb_mainbar").prepend(h);vb.includeJs("http://assets.cn.omroep.nl/javascripts/npo-explore.js");},log:function(msg){var w=document.getElementById("logwin");if(!w){return;}
w.innerHTML+="<br />"+msg;},initJQueryDependent:function(){if(vb.initJQueryDependentStarted){return;}
vb.initJQueryDependentStarted=true;try{if(typeof(vb_jQueryNoConflict)!="undefined"&&vb_jQueryNoConflict===true){jQuery.noConflict();}}catch(e){}
vb.includeIE6Css();vb.createOverlay();vb.handleProgramExceptions();vb.createProgramsAndSitesContainer();vb.createVideoContainer();vb.createActueelContainer();vb.createWordlidContainer();vb.initCloseLinks();vb.initMainbar();vb.addSkiplink();jQuery(window).resize(vb.resizeHandler);vb.resizeHandler();jQuery(window).scroll(vb.scrollHandler);setTimeout(vb.addNpoMenu,1000);},init:function(){vb.closelinkHTML='<div class="vb_close"><a href="#" title="overlay sluiten"><img src="'+vb.assets_root+'spacer.gif" width="54" height="13" alt="" />&nbsp;</a></div>';vb.includeCss(vb.css_root+"varabalk-min.css");vb.createMainbar();var jQueryLoaded=false;if(typeof window["jQuery"]!="undefined"){var currVersion=jQuery.fn.jquery;if(vb.isMinimalVersion(currVersion,vb.jQueryMinVersion)){jQueryLoaded=true;}}
if(jQueryLoaded){vb.initJQueryDependent();}else{vb.includeJs("http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js",vb.initJQueryDependent);}}};vb.init();
