Index: /extensions/gally/gally-default/template/mainpage_categories.tpl
===================================================================
--- /extensions/gally/gally-default/template/mainpage_categories.tpl	(revision 12593)
+++ /extensions/gally/gally-default/template/mainpage_categories.tpl	(revision 12594)
@@ -14,5 +14,5 @@
           {$cat.NAME}
             {if !empty($cat.icon_ts)}
-            <img title="{$cat.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent{if $cat.icon_ts.IS_CHILD_DATE}_by_child{/if}.png" class="icon" alt="(!)">
+              <span title="{$cat.icon_ts.TITLE}" class="button id_recent_cat{if $cat.icon_ts.IS_CHILD_DATE}_by_child{/if}">&nbsp;</span>
             {/if}
         </h3>
Index: /extensions/gally/gally-default/template/picture.tpl
===================================================================
--- /extensions/gally/gally-default/template/picture.tpl	(revision 12593)
+++ /extensions/gally/gally-default/template/picture.tpl	(revision 12594)
@@ -303,5 +303,5 @@
 
             {if (isset($rate_summary) or isset($rating)) and  $display_info.rating_score}
-              <tr>
+              <tr id="rating">
                 {if isset($rate_summary)}
                   <td class="label">{'Rating score'|@translate}</td>
@@ -324,20 +324,34 @@
 
                     <form action="{$rating.F_ACTION}" method="post" id="rateForm" style="margin:0;">
-                    <div>&nbsp;
-                    {foreach from=$rating.marks item=mark name=rate_loop}
-                    {if !$smarty.foreach.rate_loop.first} | {/if}
-                    {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE}
-                      <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}" />
-                    {else}
-                      <input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}" />
-                    {/if}
-                    {/foreach}
-                    <script type="text/javascript" src="{$ROOT_URL}themes/default/js/rating.js"></script>
-                    <script type="text/javascript">
-                    makeNiceRatingForm( {ldelim}rootUrl: '{$ROOT_URL|@escape:"javascript"}', image_id: {$current.id},
-                    updateRateText: "{'Update your rating'|@translate|@escape:'javascript'}", updateRateElement: document.getElementById("updateRate"),
-                    ratingSummaryText: "{'%.2f (rated %d times)'|@translate|@escape:'javascript'}", ratingSummaryElement: document.getElementById("ratingSummary") {rdelim} );
-                    </script>
-                    </div>
+                      <div>&nbsp;
+                      {foreach from=$rating.marks item=mark name=rate_loop}
+                        {if !$smarty.foreach.rate_loop.first} | {/if}
+
+                        {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE}
+                          <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}" />
+                        {else}
+                          <input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}" />
+                        {/if}
+
+                      {/foreach}
+
+                      {combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
+                      {combine_script id='rating' load='async' require='core.scripts' path='themes/default/js/rating.js'}
+
+
+                      {footer_script}
+                        var _pwgRatingAutoQueue = _pwgRatingAutoQueue||[];
+                        _pwgRatingAutoQueue.push( {ldelim}rootUrl: '{$ROOT_URL}', image_id: {$current.id},
+                          onSuccess : function(rating) {ldelim}
+                            var e = document.getElementById("updateRate");
+                            if (e) e.innerHTML = "{'Update your rating'|@translate|@escape:'javascript'}";
+                            e = document.getElementById("ratingScore");
+                            if (e) e.innerHTML = rating.score;
+                            e = document.getElementById("ratingCount");
+                            if (e) e.innerHTML = "({'%d rates'|@translate|@escape:'javascript'})".replace( "%d", rating.count);
+                          {rdelim}{rdelim} );
+                      {/footer_script}
+
+                      </div>
                     </form>
                   </td>
