You can use the before and after callback in the option settings, example:
function get_random_color() {
var letters = '0123456789ABCDEF'.split('');
var color = '#';
for (var i = 0; i < 6; i++ ) {
color += letters[Math.round(Math.random() * 15)];
}
return color;
}
$('.slideshow').cycle({
before: function(){ $('body').css('background-color', get_random_color()); },
fx: 'fade'
});
hope this helps.