$(function() {

    $('#s1').cycle({
        fx:    'fade',
		speed:  800, 
		timeout: 3000,
        prev:    '#prev',
        next:    '#next',
        pager:   '#nav',
		pause: 1
});

    function pagerFactory(idx, slide) {
        var s = idx > 18 ? ' style="display:none"' : '';
        return '<li'+s+'><a href="#">&nbsp;'+(idx+1)+'&nbsp;</a></li>';
    };
    
});
