OK I solved the problem. I was making it way too complicated w/ my jQuery. Here is what I ended up doing instead, and it worked perfectly:
$(document).ready(function(){
var maxheight = 0;
$('.galleries li').each(function(){
if (maxheight < $(this).height()) {
maxheight = $(this).height();
}
});
$('.galleries li').height(maxheight);
});
Thank you to everyone who tried to help me. I appreciate it!
Cynthia