Index: extensions/Fotorama/template/slideshow.tpl
===================================================================
--- extensions/Fotorama/template/slideshow.tpl	(revision 29615)
+++ extensions/Fotorama/template/slideshow.tpl	(revision 29621)
@@ -2,10 +2,8 @@
 {combine_script id='fotorama' require='jquery' load='header' path='plugins/Fotorama/fotorama/fotorama.js'}
 
-{literal}
-<script type="text/javascript">
-var image_w = {/literal}{$item_height}{literal}
-var image_h = {/literal}{$item_height}{literal}
+<script>
+var image_w = {$item_height};
+var image_h = {$item_height};
 </script>
-{/literal}
 
 <div id="slideshow">
@@ -13,5 +11,5 @@
 	<div class="browsePath">
 	  {if isset($U_SLIDESHOW_STOP) }
-		[ <a href="{$U_SLIDESHOW_STOP}">{'stop the slideshow'|@translate}</a> ]
+		[ <a href="{$U_SLIDESHOW_STOP}">{'stop the slideshow'|translate}</a> ]
 	  {/if}
 	  <h2 class="showtitle">{$current.TITLE}</h2>
@@ -27,12 +25,12 @@
       <div class="fotorama" data-startindex="{$current_rank}" data-ratio="16/9" data-auto="false"
         data-width="100%" data-maxheight="100%" data-minheight="200" data-height="{$item_height}"
-        data-shadows="{if $Fotorama['shadows']}true{else}false{/if}" data-nav="{$Fotorama['nav']}" data-fit="{$Fotorama['fit']}"
-        data-allowfullscreen="{$Fotorama['allowfullscreen']}" data-autoplay="{if $Fotorama['autoplay']}true{else}false{/if}"
-        data-transition="{$Fotorama['transition']}" data-stopautoplayontouch="{if $Fotorama['stopautoplayontouch']}true{else}false{/if}"
-        data-loop="{if $Fotorama['loop']}true{else}false{/if}" data-captions="false" data-thumbheight="{$Fotorama['thumbheight']}" data-thumbwidth="{$Fotorama['thumbheight']}">
+        data-shadows="{if $Fotorama.shadows}true{else}false{/if}" data-nav="{$Fotorama.nav}" data-fit="{$Fotorama.fit}"
+        data-allowfullscreen="{$Fotorama.allowfullscreen}" data-autoplay="{if $Fotorama.autoplay}true{else}false{/if}"
+        data-transition="{$Fotorama.transition}" data-stopautoplayontouch="{if $Fotorama.stopautoplayontouch}true{else}false{/if}"
+        data-loop="{if $Fotorama.loop}true{else}false{/if}" data-captions="false" data-thumbheight="{$Fotorama.thumbheight}" data-thumbwidth="{$Fotorama.thumbheight}">
       {foreach from=$items item=thumbnail}
-        <a href="{$thumbnail['derivative']->get_url()}"
-          data-full="{$thumbnail['derivative_big']->get_url()}" data-url="{$thumbnail['url']}" data-caption="{$thumbnail['TITLE']}"
-          {if $Fotorama['nav'] == 'thumbs' || $Fotorama['fullscreen_nav'] == 'thumbs'}data-thumb="{$thumbnail['derivative_thumb']->get_url()}"{/if}>
+        <a href="{$thumbnail.derivative->get_url()}"
+          data-full="{$thumbnail.derivative_big->get_url()}" data-url="{$thumbnail.url}" data-caption="{$thumbnail.TITLE}"
+          {if $Fotorama.nav == 'thumbs' || $Fotorama.fullscreen_nav == 'thumbs'}data-thumb="{$thumbnail.derivative_thumb->get_url()}"{/if}>
         </a>
       {/foreach}
@@ -42,5 +40,5 @@
 </div>
 
-{footer_script require='jquery'}{literal}
+{footer_script require='jquery'}
   var fullscreen = false;
   jQuery().ready(function() {
@@ -50,14 +48,14 @@
             function (e, fotorama, extra) {
               if (!fullscreen) {
-                {/literal}{if isset($replace_picture)}{literal}
+                {if isset($replace_picture)}
                 history.replaceState(null, null, fotorama.activeFrame['url']);
-                {/literal}{else}{literal}
+                {else}
                 history.replaceState(null, null, fotorama.activeFrame['url']+'&slideshow=');
                 jQuery('#slideshow .browsePath a').attr('href', fotorama.activeFrame['url']);
-                {/literal}{/if}{literal}
+                {/if}
 
                 jQuery('#slideshow .showtitle').text(fotorama.activeFrame['caption']);
-                jQuery('#slideshow .imageNumber').text((fotorama.activeFrame['i'])+'/'+{/literal}{count($items)}{literal});
-                document.title = fotorama.activeFrame['caption'] + ' | {/literal}{$GALLERY_TITLE|@escape:javascript}{literal}';
+                jQuery('#slideshow .imageNumber').text((fotorama.activeFrame['i'])+'/{count($items)}');
+                document.title = fotorama.activeFrame['caption'] + ' | {$GALLERY_TITLE|escape:javascript}';
               }
             }
@@ -66,8 +64,8 @@
             function (e, fotorama, extra) {
               fotorama.setOptions({
-                nav: "{/literal}{$Fotorama['fullscreen_nav']}{literal}",
-                {/literal}{if $Fotorama['enable_caption']}{literal}
+                nav: "{$Fotorama.fullscreen_nav}",
+                {if $Fotorama.enable_caption}
                 captions: "true",
-                {/literal}{/if}{literal}
+                {/if}
               });
               fotorama.startAutoplay();
@@ -79,28 +77,28 @@
         .on('fotorama:fullscreenexit',
             function (e, fotorama, extra) {
-              {/literal}{if $Fotorama['only_fullscreen']}{literal}
+              {if $Fotorama.only_fullscreen}
               window.location.replace(fotorama.activeFrame['url']);
-              {/literal}{else}{literal}
+              {else}
 
               fotorama.setOptions({
-                nav: "{/literal}{$Fotorama['nav']}{literal}",
-                {/literal}{if $Fotorama['enable_caption']}{literal}
+                nav: "{$Fotorama.nav}",
+                {if $Fotorama.enable_caption}
                 captions: "false",
-                {/literal}{/if}{literal}
+                {/if}
               });
 
-              {/literal}{if isset($replace_picture)}{literal}
+              {if isset($replace_picture)}
               history.replaceState(null, null, fotorama.activeFrame['url']);
-              {/literal}{else}{literal}
+              {else}
               history.replaceState(null, null, fotorama.activeFrame['url']+'&slideshow=');
               jQuery('#slideshow .browsePath a').attr('href', fotorama.activeFrame['url']);
-              {/literal}{/if}{literal}
+              {/if}
 
               jQuery('#slideshow .showtitle').text(fotorama.activeFrame['caption']);
-              jQuery('#slideshow .imageNumber').text((fotorama.activeFrame['i'])+'/'+{/literal}{count($items)}{literal});
-              document.title = fotorama.activeFrame['caption'] + ' | {/literal}{$GALLERY_TITLE|@escape:javascript}{literal}';
+              jQuery('#slideshow .imageNumber').text((fotorama.activeFrame['i'])+'/{count($items)}');
+              document.title = fotorama.activeFrame['caption'] + ' | {$GALLERY_TITLE|escape:javascript}';
 
               fullscreen = false;
-              {/literal}{/if}{literal}
+              {/if}
             }
         )
@@ -108,7 +106,7 @@
         .fotorama();
       
-      {/literal}{if $Fotorama['only_fullscreen']}{literal}
+      {if $Fotorama.only_fullscreen}
       jQuery('.fotorama').data('fotorama').requestFullScreen();
-      {/literal}{/if}{literal}
+      {/if}
   });
-{/literal}{/footer_script}
+{/footer_script}
