Dude, the way you're doing all this seems pretty complicated, why do not you try to simplify?
To know which gallery was selected you could do something like this:
<ol>
<li class="galeria" data-galeria="casais">Casais</li>
<li class="galeria" data-galeria="gravidas">Grávidas</li>
<li class="galeria" data-galeria="criancas">Crianças</li>
<li class="galeria" data-galeria="bebes">Bebês</li>
</ol>
And to load the galleries that are being clicked you do the following:
$(document).on("click", ".galeria", function()
{
var galeriaSelecionada = $(this).data("galeria");
$('#conteudo').load('galeria.php?galeria=' + galeriaSelecionada,
function(){
$('#gallery a').lightBox();
}
);
});