function imgValignCenter(parent) {
var img = $(parent).find('img');
$(img).load(function() {
var wrHeight = $(parent).height();
var imgHeight = $(img).height();
var imgTopPos = (wrHeight - imgHeight)/2;
$(img).css('margin-top', imgTopPos+'px');
});
}
$(document).ready(function(){
$('.parentImgDiv').each(function(){
imgValignCenter($(this));
});
});