jQuery(function(){
     




	


    $wrapper = $('#news-items');
    if($wrapper[0]){
	$thumbs = $wrapper.children();
	itemWidth = $thumbs.filter(':first').outerWidth(true);
	fullWidth = itemWidth * $thumbs.size()
	$wrapper.width(fullWidth+7)  

	// options

	 
	$('.news-bt-direction').click(function(e){
	    var operator = '+';
	    var options = {velocity: 1200, stepSize: itemWidth}
	    if($(this).is('.bt-left'))
		operator = '-';

	    $('#overflowed-box').animate({
		scrollLeft: operator + '=' + options.stepSize + 'px'
	    }, options.velocity, 'easeOutBounce')

	    e.preventDefault();
	})
    } 

})

 
