function customScrollable(scrollableContext, speed, easing, autoscroll, delay, hasCaptions) {

    this.scrollableContext = scrollableContext;
    this.speed = speed;
    this.easing = easing;
    this.autoscroll = autoscroll;
    this.delay = delay;
    this.hasCaptions = hasCaptions;
    this.initCaption = initCaption;
    this.init = init;

    function initCaption(){
        //show caption on hover
        if($(".itemContainer .caption", scrollableContext).size() > 0){
            $(".scrollable",scrollableContext).hover(function(){
                $(".itemContainer .caption",scrollableContext).fadeIn("medium");
            },
            function(){
                $(".itemContainer .caption",scrollableContext).fadeOut("medium");
            });
        }
    }

    function init(){
        var scroller = $(".scrollable", scrollableContext).scrollable({
            next: scrollableContext + "Next",
            prev: scrollableContext + "Prev",
            items: ".items",
            speed: speed,
            easing: easing,
            circular: true
        });

        if(autoscroll){
            scroller.autoscroll(delay);
        }

        if(hasCaptions){
            this.initCaption();
        }
    }
}
