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