JuiceboxBuilder does not read the image's EXIF orientation flag and dynamically rotate the image. It just displays the image (in the application's interface) as is. Also, when you allow JuiceboxBuilder to resize images when creating a gallery, all embedded metadata (including the EXIF orientation flag) is stripped from the image so the image in the gallery (displayed in a web browser) should be in the same orientation as it is in JuiceboxBuilder's interface. The image displayed in the gallery will have no EXIF orientation flag so no programs (such as web browsers) would be able to read such a flag and dynamically rotate the image.
However, it sounds like you might have deselected the 'Resize Images' checkbox, in which case JuiceboxBuilder would simply copy the source images across to the gallery's 'images' folder with all embedded metadata (including the EXIF orientation flag) intact and the web browser is reading the EXIF orientation tag and dynamically rotating the image in the gallery.
Regardless of the state of the 'Resize Images' checkbox, JuiceboxBuilder will always resize images (stripping out the metadata) for the thumbnails and this would explain why your thumbnails are oriented correctly (they do not have EXIF orientation flags) whereas some of your main images (which do have EXIF orientation flags) are not.
I can't be sure that this is what is happening but it sounds like it might be a possibility.
EXIF orientation can be a bit of a minefield at times and there seems to be little consistency in how the EXIF orientation flag is handled by different programs and platforms. This article (whilst a little out-of-date), gives a sense of how complex and confusing EXIF orientation can be.
One sure-fire way to avoid such problems would be to re-save your images (prior to feeding them to JuiceboxBuilder) in an imaging program (such as Adobe Photoshop) stripping out the EXIF metadata and, then, if necessary, rotate the images in JuiceboxBuilder's interface (via the rotate button near the lower right corner of the 'Images' tab after clicking the relevant thumbnail to reveal the input fields at the bottom of the window) so that it is visually oriented correctly.
I realise that this will add an extra step to your existing workflow but it should hopefully solve any orientation problems.
Otherwise, if you are not already doing so, just select the 'Resize Images' checkbox and allow JuiceboxBuilder to resize your images (making sure that the orientation is OK in JuiceboxBuilder's interface).
I hope this helps.