var slideshow = {
    context: false,
    timeout: 5000,      // time before next slide appears (in ms)
    slideSpeed: 1000,   // time it takes to slide in each slide (in ms)
    fx: 'fade',   // the slide effect to use
    
    init: function() {
        // set the context to help speed up selectors/improve performance
        this.context = jQuery('#featured');
        this.prepareSlideshow();
    },
    
    prepareSlideshow: function() {
        // initialise the jquery cycle plugin -
        // for information on the options set below go to: 
        // http://malsup.com/jquery/cycle/options.html
        jQuery('div#featImg', slideshow.context).cycle({
            fx: slideshow.fx,
            timeout: slideshow.timeout,
            speed: slideshow.slideSpeed,
            pauseOnPagerHover: true,
            pause: true
        });            
    },
};


jQuery(document).ready(function() {
    // add a 'js' class to the body
    // initialise the slideshow when the DOM is ready
    slideshow.init();
});  
