﻿
function updateCarousel(direction) {

    if (direction == 'left') {
        if (currentPosition != 1) {
            currentPosition--;
        }
    }
    else if (direction == 'right') {

        if (currentPosition + thumbnailLimit <= thumbnailCount)
        currentPosition++;
    }
    else {
        return;
    }
   
    for (var i = 1; i < thumbnailCount + 1; i++) {
        $('#thumbnail' + i.toString()).hide();
    }

    for (var i = currentPosition; i < thumbnailCount + 1; i++) {
        
        if(i >= currentPosition && i < (currentPosition + thumbnailLimit))
        $('#thumbnail' + i.toString()).show();
    }
}

function documentReady() {

    var walkthroughs = {
        inline: true,
        href: '#walkthroughs',
        onOpen: function() { $("#monoslideshow").hide(); },
        onClosed: function() { $("#monoslideshow").show(); }
    };

    $('#popUpWl').colorbox(walkthroughs);
}

$(document).ready(documentReady);
