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