Theming Image fields in page.tpl.php
This code should do it:

&lt;div class="gal-wrapper"&gt;
    &lt;?php foreach ((array)$node-&gt;field_image as $item_id =&gt; $item) { ?&gt;
      &lt;div id="&lt;?php print $item_id+1?&gt;" class="gallery"&gt;&lt;?php print $item['view'] ?&gt;&lt;/div&gt;
    &lt;?php } ?&gt;
&lt;/div&gt;