var main = {
    init: function() {
        $.fn.hoverscroll.params = $.extend($.fn.hoverscroll.params, {
            debug: true
        });


        $('#my-vertical-list').hoverscroll({
            vertical: true,
            width: 290,
            height: 200,
            fixedArrows: false
        });
	$('#my-vertical-list2').hoverscroll({
            vertical: true,
            width: 290,
            height: 200,
            fixedArrows: false
        });
        $('#my-horizontal-list').hoverscroll({
            vertical: false,
            width: 800,
            height: 38,
            fixedArrows: false
        });

	$("#my-vertical-list")[0].startMoving(0.5, 2);
	$("#my-vertical-list2")[0].startMoving(0.5, 2);
	$("#my-horizontal-list")[0].startMoving(0.5, 2);
        

        


        $('#maintabs').tabs();
        
        $('.tablink').click(function() {
            var tab = $(this).attr('rel');
            if (tab != null && tab != "") {
                $('#maintabs').tabs('select', tab);
            }
            return false;
        });
        
        $('#viewExampleSource').click(
            function() {$('#example-source').slideToggle('slow');return false;}
        );
        
        $('#example-source').hide();
    }
};

$(document).ready(function() {
    main.init();
});


