Thanks! With some help I got it to work. Since a different gallery had to load on different interactions the code finally looked like this:
$('.more').click(function loadGallery() {
var galleryContainer = $(this).siblings('.details').find('.gallery').attr('id');
new juicebox({
containerId: galleryContainer,
baseUrl: "http://www.stromqvi.st/wp-content/themes/MasterKenobi/"+galleryContainer+"/",
galleryWidth: "620",
galleryHeight: "463",
backgroundColor: "rgba(0,0,0,0)"
});
})
The only constraint is that I have to name the gallery folder and the div I write in my wordpress post the same.
Thought this might have some value to someone else.