// Magic Box - offers scrolling pad by Dorin Botez

var $j = jQuery.noConflict(); 

// enable transition between frames
$j(function() {

    // initialize scrollable  
    $j("div.magicbox").scrollable({

        size: 1,
        api: true,
        keyboard: true,
        clickable: false,

        // items are auto-scrolled - set up the interval in miliseconds 
        interval:5000,

        // when last item is encountered go back to first item
        loop: true,

        // animation speed 
        speed:1000,

        // this is just for show-off ;) - when seek starts make items little transparent
        onBeforeSeek: function() {
            this.getItems().fadeTo(500, 0.1);
        },

        // when seek ends resume items to full transparency 
        onSeek: function() {
            this.getItems().fadeTo(400, 1);
        }
    });

    // Display numbers on navigation tabs  
    $j("div.navi a").each(function(i) {
        $j(this).html(i+1);
    }); 

});

