/* Author: 
    Kenny Korte @DutchBridge
*/

var $j = jQuery.noConflict(), $slides, t, $visible, $next;

$j(document).ready(function () {
    
    $j('a[rel=nofollow],a[rel=appendix]').click(function (e) {
        window.open($j(this).attr('href'));
        e.preventDefault();
    });
    
    $slides = $j('.slideshow').children('article');
    if ($slides.length > 1) {
        $j('.slideshow').children('article:not(:first)').hide();
        setTimeout('slide()', 5000);
    }
    
});
            
slide = function () {  
    $visible = $j('.slideshow').children(':visible');
    $next = $visible.next();
    
    if (!$next.length) {
        $next = $slides.first();
    }
    
    $visible.fadeOut('slow', function(){
        $next.fadeIn('slow');
    });

    t=setTimeout('slide()', 5000);
}

function createPopup(vid_name){
  window.open('/nl/popup.php?video='+vid_name,'vid_name','width=350,height=267,scrollbars=no,toolbar=no,location=no');
  return false;
} 
