{combine_css path="plugins/Fotorama/fotorama/fotorama.css"} {combine_script id='fotorama' require='jquery' load='header' path='plugins/Fotorama/fotorama/fotorama.js'} {literal} {/literal}
{if isset($U_SLIDESHOW_STOP) } [ {'stop the slideshow'|@translate} ] {/if}

{$current.TITLE}

{$PHOTO}
{footer_script require='jquery'}{literal} var fullscreen = false; jQuery().ready(function() { jQuery('.fotorama') // Listen to the events .on('fotorama:showend ', function (e, fotorama, extra) { if (!fullscreen) { history.replaceState(null, null, fotorama.activeFrame['url']+'&slideshow='); jQuery('#slideshow .browsePath a').attr('href', fotorama.activeFrame['url']); jQuery('#slideshow .showtitle').text(fotorama.activeFrame['title']); jQuery('#slideshow .imageNumber').text((fotorama.activeFrame['i'])+'/'+{/literal}{count($items)}{literal}); document.title = fotorama.activeFrame['title'] + ' | {/literal}{$GALLERY_TITLE}{literal}'; } } ) .on('fotorama:fullscreenenter', function (e, fotorama, extra) { fotorama.setOptions({ nav: "{/literal}{$Fotorama['fullscreen_nav']}{literal}" }); fotorama.startAutoplay(); if (jQuery('.fotorama').attr('data-allowfullscreen') == 'native') fullscreen = true; } ) .on('fotorama:fullscreenexit', function (e, fotorama, extra) { {/literal}{if $Fotorama['only_fullscreen']}{literal} window.location.replace(fotorama.activeFrame['url']); {/literal}{else}{literal} fotorama.setOptions({ nav: "{/literal}{$Fotorama['nav']}{literal}" }); history.replaceState(null, null, fotorama.activeFrame['url']+'&slideshow='); jQuery('#slideshow .browsePath a').attr('href', fotorama.activeFrame['url']); jQuery('#slideshow .showtitle').text(fotorama.activeFrame['title']); jQuery('#slideshow .imageNumber').text((fotorama.activeFrame['i'])+'/'+{/literal}{count($items)}{literal}); document.title = fotorama.activeFrame['title'] + ' | {/literal}{$GALLERY_TITLE}{literal}'; fullscreen = false; {/literal}{/if}{literal} } ) // Initialize fotorama manually .fotorama(); {/literal}{if $Fotorama['only_fullscreen']}{literal} jQuery('.fotorama').data('fotorama').requestFullScreen(); {/literal}{/if}{literal} }); {/literal}{/footer_script}