$.fn.cycle.defaults.timeout = 6000;
$(function() {

    $('table pre code').not('#skip,#skip2').each(function() {
        eval($(this).text());
    });
    
    $('#s4').before('<div id="nav" class="nav">').cycle({
        fx:     'turnDown',
        speed:  'fast',
        timeout: 0,
        pager:  '#nav'
    });
});

function onBefore() {
    $('#output').html("Scrolling image:<br>" + this.src);

}
function onAfter() {
    $('#output').html("Scroll complete for:<br>" + this.src)
        .append('<h3>' + this.alt + '</h3>');
}
