$(document).ready(function(){
equalHeight($("li.imageThumbnail"));
});
function equalHeight(group) {
var tallest = 0;
var start = 1;
var end = 3;
var count = 0;
var tempStyle = "";
var thisHeight = 0;

group.each(function() {
count++;

thisHeight = $(this).height();

if(thisHeight > tallest) {
tallest = thisHeight;
}

if((count%3) == 0) {
tempStyle = tallest + "px";

for(index = start; index <= end; ++index) {
$(group[index-1]).css("height", tempStyle);
}

tallest = 0;

start += 3;

end += 3;
}
});
}
$(function(){
$(".heritageImage").batbox({close:"close",closeTitle:"close",next:"next",nextTitle:"next",previous:"previous",previousTitle:"previous"});
});
