$.fn.cycle.defaults.timeout = 6000;
$(function() {
    // run the code in the markup!
    $('table pre code').not('#skip,#skip2').each(function() {
        eval($(this).text());
    });
    
    $('#s4').before('<div id="nav" class="nav">').cycle({
        pager:  '#nav',
		fx:     'fade', 
		speed:   600, 
		timeout: 9000, 
		next:   '#s4', 
		pause:   1 

    });
	
	
	  $('#logos').before('<div id="nav1" class="nav1">').cycle({
        pager:  '#nav1',
		fx:     'fade', 
		speed:   600, 
		timeout: 4000, 
		next:   '#logos', 
		pause:   1 

    });
	  
});

function onBefore() {
    $('#output').html("Scrolling image:<br />" + this.src);
    //window.console.log(  $(this).parent().children().index(this) );
}
function onAfter() {
    $('#output').html("Scroll complete for:<br />" + this.src)
        .append('<h3>' + this.alt + '</h3>');
}