function scroll_item(elem ,isDirUp)
{
    var elem_api = $(elem).data("scrollable")
    if(isDirUp == true)
        elem_api.move(-1);
    else
        elem_api.move(1);
}

    $("#clips_ul").scrollable({
        items:'.clips_ul',
        vertical:true,
        size:17,
        next:'a.bottom',
        prev:'a.up'
    });

    $("#alfabet_list").scrollable({
        items:'.alfabet_list',
        vertical: true,
        size:17,
        next:'a.alfabet_up',
        prev:'a.alfabet_bottom',
        mousewheel: true
    });

    $("#firmy_na_litere").scrollable({
        items:'.firmy_na_litere',
        vertical: true,
        size:17,
        next:'a.firmy_spis_up',
        prev:'a.firmy_spis_bottom',
        mousewheel: true
    });
	
	$("div.scrollable").scrollable({
        items:'.items',
        vertical:true,
        size: 18,
        //navi:'ul.tabs',
        next:'div.next',
        prev:'div.prev',
        mousewheel: true
    });

    var interval;

    $('a.up').mouseover(function(){
        scroll_item("#clips_ul",true);
        interval=setInterval('scroll_item("#clips_ul",true);',500);
    }).mouseout(function(){
        clearInterval(interval);
    });

    $('a.bottom').mouseover(function(){
        scroll_item("#clips_ul",false);
        interval=setInterval('scroll_item("#clips_ul",false);',500);
    }).mouseout(function(){
        clearInterval(interval);
    });

    $('a.alfabet_up').mouseover(function(){
        scroll_item("#alfabet_list",true);
        interval=setInterval('scroll_item("#alfabet_list",true);', 500);
    }).mouseout(function(){
        clearInterval(interval);
    });

    $('a.alfabet_bottom').mouseover(function(){
        scroll_item("#alfabet_list",false);
        interval=setInterval('scroll_item("#alfabet_list",false);', 500);
    }).mouseout(function(){
        clearInterval(interval);
    });

    $('a.firmy_spis_up').mouseover(function(){
        scroll_item("#firmy_na_litere",true);
        interval=setInterval('scroll_item("#firmy_na_litere",true);', 500);
    }).mouseout(function(){
        clearInterval(interval);
    });

    $('a.firmy_spis_bottom').mouseover(function(){
        scroll_item("#firmy_na_litere",false);
        interval=setInterval('scroll_item("#firmy_na_litere",false);', 500);
    }).mouseout(function(){
        clearInterval(interval);
    });
	//---------------------------------------------------
	$('a.prev').mouseover(function(){
        scroll_item("div.scrollable",true);
        interval=setInterval('scroll_item("div.scrollable",true);', 500);
    }).mouseout(function(){
        clearInterval(interval);
    });
	
	$('a.next').mouseover(function(){
        scroll_item("div.scrollable",false);
        interval=setInterval('scroll_item("div.scrollable",false);', 500);
    }).mouseout(function(){
        clearInterval(interval);
    });
