$(document).ready(function() {
    $("ul.links li a").click(function() {
        $("ul.links li a").removeClass("hierbenik"); //Remove any "active" class
        $(this).addClass("hierbenik"); //Add "active" class to selected tab
        return false;
    });
    $("#nbArchief").fancybox({ 'width': 350, 'height': '90%', 'autoScale': false, 'transitionIn': 'none', 'transitionOut': 'none', 'type': 'iframe' });
});

$(function() {

    $(".scroll-pane").jScrollPane();
    $(".elements").draggable();
});



function revertDraggable($selector) {
    $selector.each(function() {
        var $this = $(this),
            position = $this.data("originalPosition");

        if (position) {
            $this.animate({
                left: position.left,
                top: position.top
            }, 500, function() {
                $this.data("originalPosition", null);
            });
        }
    });
}

function moveContent() {
    $('.scroll-pane-slide').animate({ 'left': '-0px' }, 'slow');
}


function toggleDiv(divId) {
    $("#" + divId).show();
}
function toggleDivBack(divId) {
    $('.scroll-pane-slide').animate({ 'left': '0px' }, 'slow');
    $("#" + divId).hide();
}

function hideIntro() {
    var t = setTimeout("divIntro()", 2500);
}

function divIntro() {
    $(".intro").fadeOut("slow");
}


function showSlidingDiv(idName, strAction) {
    if (strAction == '1') {
        $("#seoContent_target").html('');
        $("#leesmeer" + idName).show();
        $("#seoContent_target").append($("#seoContent_source").html());
    }
    else {
        $("#leesmeer" + idName).hide();
    }
    $(".scroll-pane-after").jScrollPane(
            { reinitialise: true }
     ); 

}

