function infiniteCallback(data, textStatus) {
    results = $('.scrolling', data);
    // XXX this doesn't handle the case where there are more shows than feeds
    for (i=0; i < 2; i++) {
        items = results.eq(i).children('li');
        items.find('form.rating').rating();
        items.find('.rating').height(25);
        if (typeof setUpItem == 'function')
            items.find('div.details').each(setUpItem);
        if (i == 0)
            $('.scrolling').append(results.eq(i).children('a:first'));
        $('.scrolling').eq(i).append(items);
    }
    $('ul.paginator, ul.paginator2').replaceWith(
        $('ul.paginator, ul.paginator2', data));
    checkScroll.loading = false;
    hideLoadIndicator();
}

function checkScroll() {
    first = $('ul.scrolling li:first');
    nextpage = $('ul.paginator li.selected + li, ul.paginator2 li.selected + li');
    if (!nextpage.length) return;
    doc = $(document);
    distance = doc.height() - doc.scrollTop() - $(window).height();
    if (distance < nextpage.height() + (first.height() * 6) &&
        !checkScroll.loading)
        infiniteLoad();
    as = $('a[name]');
    i = 0;
    while (i < as.length && as[i].offsetTop < doc.scrollTop())
        i++;
    if (i > 1) {
        location.href = '#pg' + as.eq(i - 1).attr('name');
    } else if (location.hash) {
        location.href = '#pg' + as.eq(0).attr('name');
    }
}

function infiniteLoad() {
    if (checkScroll.loading)
        return;
    nextpage = $('ul.paginator2 li.selected + li, ul.paginator li.selected + li');
    checkScroll.loading = true;
    showLoadIndicator(true);
    $.get(nextpage.find('a').attr('href'), infiniteCallback);
}

function checkHash() {
    if (!location.hash) return;
    hash = location.hash.substring(3);
    try {
        parseInt(hash)
    } catch (e) {
        return;
    }
    if (!$('a[name=' + hash + ']').length) {
        args = location.search;
        if (!args) {
            args = '?page=' + hash;
        } else if (args.indexOf('page=') != -1) {
            args = args.replace(/page=[^&]*/, 'page=' + hash);
        } else {
            args = args + '&page=' + hash;
        }
        location.href = location.protocol + '//' + location.host +
            location.pathname + args;
    }
}
checkScroll.loading = false;

$(document).scroll(checkScroll);
checkHash();
@@ -410,16 +410,17 @@
 etUpItem
+l
 );%0A     
@@ -688,16 +688,35 @@
  false;%0A
+    add_corners();%0A
     hide

add corners to thumbnails on infinite scroll page