
// JavaScript Document

//----------------------------------------------------------------------------------------------------
// Fonction pour scroller les contenus
//----------------------------------------------------------------------------------------------------
function jScrollPane (){
    if (document.getElementById("scrollpane-content")){
        var options = {
            scrollbarWidth:             13,         /* [int] - the width of the created scrollbar in pixels (defaults to 10) */
            scrollbarMargin:            2,          /* [int] - the margin to leave to the left of the scrollbar in pixels (defaults to 5) */
            wheelSpeed:                 18,         /* [int] - controls how fast the mouse wheel makes the content scroll in pixels (defaults to 18) */
            showArrows:                 true,       /* [boolean] - controls whether to display arrows for the user to scroll with (defaults to false) */
            arrowSize:                  0,          /* [int] - the height of the arrow buttons if showArrows=true (calculated from CSS if not provided) */
            animateTo:                  false,      /* [boolean] - whether to animate when calling scrollTo and scrollBy (defaults to false) */
            dragMinHeight:              0,          /* [int] - the minimum height to allow the drag bar to be (defaults to 0) */
            dragMaxHeight:              99999,      /* [int] - the maximum height to allow the drag bar to be (defaults to 99999!) */
            animateInterval:            100,        /* [int] - The interval in milliseconds to update an animating scrollPane (default 100) */
            animateStep:                3,          /* [int] - The amount to divide the remaining scroll distance by when animating (default 3) */
            maintainPosition:           true,       /* [boolean] - Whether you want the contents of the scroll pane to maintain it's position when you re-initialise it - so it doesn't scroll as you add more content (default true) */
            scrollbarOnLeft:            false,      /* [boolean] - Whether the scrollbar should appear on the left hand side of the panes content (make sure your CSS also reflects this) */
            reinitialiseOnImageLoad:    false       /* [boolean] - Whether the jScrollPane should automatically re-initialise itself when any contained images are loaded (defaults to false) */
        };
        if( $("#scrollpane-content").jScrollPane != null )
            $("#scrollpane-content").jScrollPane(options);
    }
}

//----------------------------------------------------------------------------------------------------
// Exécution automatique des fonctions
//----------------------------------------------------------------------------------------------------
$(document).ready(function () {
    jScrollPane();
});
