function loadImage(container, id, hsize) {
  $(container).html('<div id="imageLoad">Carregando...</div>');
  $(container).load('?route=Home/viewPhoto/'+id, function() {
    var imgContainerHeight = $('div:first', container).height();
    $('div:first > div', container).css('margin-top', ((imgContainerHeight - hsize) / 2) + 'px');
  });
}

$(function() {
  $('#imagem').css('margin-top', (($('#photo').height() - $('a[rel]').attr('rel')) / 2) + 'px');
  $('.minImg').each(function() {
    $(this).css({marginTop: (($(this).parent().height() - $('img', this).attr('height')) / 2) + 'px'});
  });
});

