﻿$(function() {
  var pane = $('.homepage_feature_left');
    pane.jScrollPane(
    {
      showArrows: false,
      animateScroll: true
    }
  );
  var api = pane.data('jsp');

  $('#but-scroll-to').bind(
    'click',
    function()
    {
      // Note, there is also scrollToX and scrollToY methods if you only
      // want to scroll in one dimension
      api.scrollTo(parseInt($('#toX').val()), parseInt($('#toY').val()));
      return false;
    }
  );

  $('#but-scroll-by').bind(
    'click',
    function()
    {
      // Note, there is also scrollByX and scrollByY methods if you only
      // want to scroll in one dimension
      api.scrollBy(parseInt($('#byX').val()), parseInt($('#byY').val()));
      return false;
    }
  );
});
