var current_scroll_location=0;
var max_scroll_location = -430;

jQuery(document).ready(function($) {
  max_scroll_location = ($('.rssreader-module div.blog-feed').length - 1) * 430 * (-1);
  $('.blog-right-scroll').click(function() {   
    current_scroll_location-=430;
    if(current_scroll_location < 0) {
      $('.blog-left-scroll').css('display', 'block');
    }
    if(current_scroll_location <= max_scroll_location) {
      $('.blog-right-scroll').css('display', 'none');
    }
    $('.rssreader-module .scroller-field').css('left', current_scroll_location + 'px');
  });
  $('.blog-left-scroll').click(function() {
    current_scroll_location+=430;
    if(current_scroll_location == 0) {
      $('.blog-left-scroll').css('display', 'none');
    }
    if(current_scroll_location <= 0) {
      $('.blog-right-scroll').css('display', 'block');
    }
    $('.rssreader-module .scroller-field').css('left', current_scroll_location + 'px');
  });
});


