document.observe("dom:loaded", function() {
  var container = $(document.body);
  if (container) {
    container.observe('click', function(e) {
      var el = e.element();
      if (el.match('.pagination a')) {
        new Ajax.Request(el.href, { method: 'get' });
        e.stop();
      }
    })
  }
})
