﻿
$.fn.cycle.defaults.timeout = 6000;
$(function() {
    // run the code in the markup!

    
    $('#s4').before('<div id="nav" class="nav">').cycle({
        fx:     'fade',
        speed:  300,
        timeout: 6000,
        //pager:  '#nav',
		after: onAfter
    });
});


// following not needed for s4 
function onBefore() {
    //$('#output').html("Scrolling image:<br/>" + this.src);
    //window.console.log(  $(this).parent().children().index(this) );
}
function onAfter() {
    $('#output').html("")
        .append('' + this.title + '');
}
