$(function() {
    var itemSearch = new ItemSearch($('#search_terms'));
 
    $('#search_results .pagination a').click(function() {
        var search_url = $(this).attr('href');
        var offset = search_url.substring(search_url.lastIndexOf('/') + 1);
 
        itemSearch.doSearch(offset);
 
        return false;
    });
});