$(document).ready(function(){
            
    $('.slideshow').cycle({
		fx:         'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
        timeout:    3000,
        speed:      3000
	});
    
    setTimeout("rideOn()", 800);
    
    var image_count = 7;
    var current_image = 0;
    var next_image = 0;
    //$('#header_cartoon').mousedown(function(event) {
    //    if(event.which == 1) {
    //        next_image = (current_image + 1) % image_count;
    //    }
    //    else {
    //        next_image = current_image - 1;
    //        if(next_image == -1){next_image = image_count - 1}
    //    }
    //    $('#banner_image' + (current_image + 1)).toggle();
    //    $('#banner_image' + (next_image + 1)).toggle();
    //    current_image = next_image;
    //});
    
    //$('#header_cartoon').bind("contextmenu", function(e) {
    //    e.preventDefault();
    //});
    
 });

function rideOn() {
    $('#riding-cartoon').fadeIn(2000);
    $('#riding-cartoon').animate(
        { right:'11em'}, {duration:2000, queue:false, complete:function() {
            $('#volunteer').show();   
        }}
    );
    for(i=0; i<3; i++) {
        $('#riding-cartoon').animate({ top:'14.5em'}, 200);
        $('#riding-cartoon').animate({ top:'16.5em'}, 200);
    }    
}
