###RHTML####
<% if @home_page_photos.length > 0 %>
<%= @home_page_photos.first.caption %>
<% end %>
<% @home_page_photos.each_with_index do |home_page_photo, i| %>
<% i += 1 %>
<% unless i == 1 -%>| <% end -%><%= link_to_remote i, :url => {:controller => :site, :action => :get_home_page_photo, :id => home_page_photo} %>
<% end %>
####RJS####
page['caption'].replace_html = @home_page_photo.caption
page['photo'].replace_html = image_tag(@home_page_photo.public_filename)