﻿if ($("#scroll").length > 0) {
    // initialize scrollable and return the programming API
    var api = $("#scroll").scrollable({
        items: '#tools',
        circular: true
        // use the navigator plugin
    }).autoscroll({ autoplay: true, interval: 5000 }).navigator().data("scrollable");


    // this callback does the special handling of our "intro page"
    api.onBeforeSeek(function (e, i) {

        // when on the first item: hide the intro
        if (i) {
            $("#intro").fadeOut("fast");

            // dirty hack for IE7-. cannot explain
            if ($.browser.msie && $.browser.version < 8) {
                $("#intro").hide();
            }

            // otherwise show the intro
        } else {
            $("#intro").fadeIn("fast");
        }

        // toggle activity for the intro thumbnail
        // $("#t0").toggleClass("active", i == 0);
    });
}
