$(window).load(function() { $('#slider').nivoSlider({ effect: 'fade', animSpeed: 1000, pauseTime: 10000 }); if ($('#slider').children('a').size() <= 1 ) { $('.nivo-prevNav').css('display', 'none'); $('.nivo-nextNav').css('display', 'none'); } $('#slideshow a.external').each(function() { $(this).click(function() { var $newWindow = window.open($(this).attr('href')); $newWindow.focus(); return false; }); }); });