$(window).load(function() { $('#slideshow').nivoSlider({ effect: 'fade', pauseTime: 5000, directionNav: false, controlNav: true }); $('#slideshow a.external').each(function() { $(this).click(function() { var $newWindow = window.open($(this).attr('href')); $newWindow.focus(); return false; }); }); $('#slideshow_wrapper').fadeIn('slow'); });