function initScroller() {

    var
        curLeft=0;
        itemWidth=$('.item').eq(0).outerWidth(),
        totalWidth=$('.item').size() * itemWidth + 3;
    $('#items').width(totalWidth+30);

    if ($('.item').size() < 4) {
       return;
    }
    
    var next=$('<a>', {
        id: 'next',
        href: 'javascript:void(0)'
    });
    var prev=$('<a>', {
        id: 'prev',
        href: 'javascript:void(0)',
        'class': 'inactive'
    });

    function updateDisabled(newLeft) {
        if (newLeft+itemWidth > 0) {
            $('#prev').addClass('inactive');
        } else {
            $('#prev').removeClass('inactive');
        }
        if (newLeft-itemWidth < -1*totalWidth + (3*itemWidth)) {
            $('#next').addClass('inactive');
        } else {
            $('#next').removeClass('inactive');
        }
    }

    next.click( function() {
        if ($(this).hasClass('inactive')) {
          return;
        }
        var newLeft=curLeft-itemWidth;
        $('#items').stop().animate({'left': newLeft}, 'slow');
        curLeft=newLeft;
        updateDisabled(newLeft);
    });
    prev.click( function() {
      if ($(this).hasClass('inactive')) {
          return;
        }
        var newLeft=curLeft+itemWidth;
        $('#items').stop().animate({'left': newLeft}, 'slow');
        curLeft=newLeft;
        updateDisabled(newLeft);
    });
    $('#main').prepend(next).prepend(prev);

}
