$(document).ready(function() {

    // Start billboard slider
    // met tabs en slideshow van http://flowplayer.org/tools/tabs/index.html
    var oBillboard = $("#billboardSlider ul.navigation").tabs("#billboardSlider .items > .item", {
                         current: 'active',
                         effect: 'fade',
                         fadeInSpeed: 500,
                         fadeOutSpeed: 0,
                         history: false,
                         rotate: true,
                         initialIndex: iInitialIndex,
                         event: 'mouseover',
                         onClick: function(event, index){

                             var oPane = this.getCurrentPane();
                             var sBackground = "#4A4641 url("+$(oPane).find("img").attr("src")+") top left no-repeat";
                             $("#billboardSlider").css("background", sBackground);

                         }
                     }).slideshow({
                        autoplay: true,
                        interval: 5000
                     });

    // click op navigatie binnen billboard afvangen
    $("#billboardSlider ul.navigation a").click(function(e) {
        window.location = $(this).attr('href');
    });

});
