
<%= stylesheet_link_tag "gallery_frontend" %>

<div id="orbit_gallery" class="rg">
  <div class="rgbody">
    <div id="imgholder">
      <div class="rslide" style="position:relative; width:100%;">
        <div class="rslideinside"><div id="loading" style="display:none;"></div>
          <div class="comp" id='main_pic' data-content='<%= @image.gallery_album_id %>'><a href="" id="nextpic" class="navN" title="下一張" onclick="return false;" ><img src="<%= @image.file.url %>" alt="" /></a></div>
          <div class="rslidenav">
            <a href="" class="navP" title="上一張" onclick="return false;">Prev</a>
            <a href="" class="navN" title="下一張" onclick="return false;">Next</a>
          </div>
        </div>
        <div class="slidelist">
          <ul id='galleryimagelist' style="display:none;">
            <% @images.each_with_index do |image,i| %>
              <li for="<%= i %>"><a href="<%= image.id %>" class="list_element" data-content="<%= image.file.url %>" onclick="return false;"><img src="<%= image.file.thumb.url %>" alt="" /></a></li>
            <% end  %>
          </ul>
        </div>
        <div class="slidectrl">
          <a href="" class="togglescreen" title="切換全螢幕" onclick="return false;">Screen</a>
          <a href="" class="togglelist" title="顯示照片清單" onclick="return false;">List</a>
          <a href="" class="browserfullscreen" title="顯示照片清單" onclick="return false;">F</a>
          <div class="slideinfo">
            <span class="info"><%= @image.description %></span>
          </div>
        </div>
      </div>
    </div>
  </div>
  <!-- tag part -->
  <div class="taglist"> 
    <h3 class="taglist_title"><%= t('gallery.photo_tag') %></h3>
    <ul>
      <% @tagnames.each do |tagname| %>
        <li><%= tagname %></li>
      <% end %>
    </ul>
  </div>
  <!-- tag end -->
  <div class="form-actions form-fixed pagination-right rghead">
  <div class="rgfn">
    <a class="bt-back rgbt" title="<%= I18n.t("gallery.back_to_albums") %>" href="<%= @back_link %>"><i class="icon-arrow-left"></i> <%= I18n.t("gallery.back_to_albums") %></a>
  </div>
</div>
</div>

<% content_for :page_specific_javascript do %>
  <%= javascript_include_tag "galleryAPI_frontend" %>
   <%#= javascript_include_tag "jquery.tinyscrollbar" %>
  <%= javascript_include_tag "rss" %>
<% end %>

<script type="text/javascript">
  galleryAPI.prototype.locale = "<%= I18n.locale %>";
    	var gallery = new galleryAPI();
    	gallery.initialize();
    	gallery.loadArea = "theater";
    	gallery.loadTheater("<%= params[:id] %>");
</script>





