$(document).ready(function() {

    // Alle links met rel="external" in een nieuw venster openen
    $("a[rel=external]").each(function(i){
        this.target="_blank";
    });

    makeSlideshow();

});

/*
 *  Zoek naar div#slideshow, als deze bestaat start de slideshow
 *  Gebruikt Showcase 2.0 plugin voor jQuery
 */

function makeSlideshow() {

    if ($("#slideshow").length > 0) {
        $("#slideshow").showcase({
                                    images: aImages,
                                    linksOn: 'titles',
                                    css: {
                                        position: 'relative',
                                        width: '980px',
                                        height: '464px',
                                        border: 'none',
                                        overflow: 'visible',
                                        "z-index": 1
                                    },
                                    animation: {
                                        stopOnHover: false,
                                        interval: 6000,
                                        speed: 1000
                                    },
                                    navigator: {
                                        css: {
                                            display: "none"
                                        }
                                    },
                                    titleBar: {
                                        enabled: false
                                    }
                                 });
    }

}

