The Email Button is a 'mailto' link which opens the user's default email client.
If the user has an email program installed (such as Outlook or Thunderbird), then this program will be opened (in its own window) whether the gallery is in an iframe or not.
However, I suspect that your default email client may be a web service (such as Gmail) and that this might be the root of your problem.
I have an email program installed and it opens fine when using the Email Button from both of your links.
If I then change my browser's 'mailto' action to 'Use Googlemail', then the Email Button still works fine from both of your links (but the email page replaces the gallery page in both instances).
Unfortunately while it's in the iFrame, the e-mail button does not work.
What browser do you see the problem in and what is your default email client?
Also, what exactly do you mean when you say that it does not work? Does nothing happen at all when you click the Email Button or does it just not work as expected? (It works fine on my own system with an email program installed.)
Is there anything I can modify to do that?
The code which sets the click handler for the Email Button is buried deep within the 'juicebox'js' JavaScript file which is obfuscated and cannot be modified.
The only thing you could do is override Juicebox's own handling of the Email Button and introduce your own functionality instead.
You could try something like this:
<!--START JUICEBOX EMBED-->
<script src="jbcore/juicebox.js"></script>
<script>
var jb = new juicebox({
buttonBarPosition: "TOP",
containerId: "juicebox-container",
emailAddress: "email@address.com",
emailSubject: "Gallery",
showEmailButton: "TRUE"
});
jb.onInitComplete = function() {
$('.jb-bb-btn-email').off('click');
$('.jb-bb-btn-email').click(function() {
var img = jb.getImageIndex();
window.open('mailto:email@address.com?subject=Gallery&body=Image No. ' + img);
});
};
</script>
<div id="juicebox-container"></div>
<!--END JUICEBOX EMBED-->
The code above will likely open a new tab (even if the user's email client is a program) so it might need some further work but I hope it points you in the right direction and helps to get you started.