Thank you for your answer.
1) Without setting display:none for the gallery tab, video tab is still invisible, even if z-index is higher, and Visibility for gallery is set to invisible.
2) This is not possible, because all page is responsive.
3) Page is loaded with gallery tab open by default, so it is not possible to load gallery on click. But may be it is possible to force gallery to refresh dimensions each time when the 'photo' tab is clicked?

Using juicebox output in tab style design (have 2 div tabs, one called "photo" with juicebox gallery inside, and other called "video" with youtube player inside), switching between them with changing css:

display: block;
visibility: visible;

display: none;
visibility: hidden;

Juicebox tab is visible by default, after I click to video tab and than back to photo -- everything works fine. But if I click to video tab (making juicebox tab not visible) and change the browser window size (or it can happen automatically in mobile browsers, when they hide address bar) then click back to juicebox tab -- juicebox output looks like the width of the page is about 133px, after I change size of window it looks fine again.

So seems like juicebox receiving wrong screen size when div is invisible.

Is there any workaround for that problem?

Any workaround to get rid of that?

http://bestpics.ru/full/juicebox_free_space.jpg