// JScript source code
$slideshow = {
    context: false,
    tabs: false,
    timeout: 5000,      // time before next slide appears (in ms)
    slideSpeed: 800000,   // time it takes to slide in each slide (in ms)
    tabSpeed: 900000,      // time it takes to slide in each slide (in ms) when clicking through tabs
    fx: 'custom',   // the slide effect to use

    init: function() {
        // set the context to help speed up selectors/improve performance
        this.context = $('#slideshow');

        // prepare slideshow and jQuery cycle tabs
        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
        $("div.slideshow-slides > ul", $slideshow.context).cycle({
            fx: $slideshow.fx,
            cssBefore: { left: 0, top: 0, width: 1118, height: 470, display: 'block' },
            animOut: { opacity: 0 },
            animIn: { left: 0, top: 0, width: 1118, height: 470, opacity: 1 },
            delay: $slideshow.timeout,
            cssAfter: { }
        });
    }
};

$(window).load(function() {
    // initialise the slideshow when the window is ready
    $slideshow.init();
});
