Can you store $items.outerHeight() in a var? You calculate it twice here.