<% @body_id = 'author-page' %>
<% @body_class = 'serif-headers' %>
<% cache @author do %>
<div class="row">
	<div class="alpha columns four author-photo">
		<%= image_tag @author.photo.url %>
	</div>
	<div class="omega columns twelve readable-text">
		<div>
			<%= display_bookmarks(@author) if gem_available? 'spree_social_bookmarks' %>
			<%= content_tag(:h1, @author.name) %>
		</div>
		<div id="author-description">
			<%== auto_link(RDiscount.new(@author.biography || "", :smart).to_html, :html => { :encode => 'javascript' }) %>
		</div>
	</div>
</div>

<div class="row">
	<%= content_tag(:h2, t(:speaker_video_samples)) %>
</div>
<div class="row" id="author-videos" data-hook='author-videos'>
	<% @author.videos.each do |video| %>
	<div class="<%= cycle('alpha', 'omega') %> columns eight">
		<%= render 'spree/products/video_player', :video => video, :html_options => { :width => 400 } %>
	</div>
	<% end %>
</div>

<div class="row" id="author-products">
	<%= render 'products', :author => @author %>
</div>
<% end %>
<% @body_id = 'author-page' %>
<% @body_class = 'serif-headers' %>
<% cache @author do %>
<div class="row">
	<div class="alpha columns four author-photo">
		<%= image_tag @author.photo.url %>
	</div>
	<div class="omega columns twelve readable-text">
		<div>
			<%= display_bookmarks(@author) if gem_available? 'spree_social_bookmarks' %>
			<%= content_tag(:h1, @author.name) %>
		</div>
		<div id="author-description">
			<%== auto_link(RDiscount.new(@author.biography || "", :smart).to_html, :html => { :encode => 'javascript' }) %>
		</div>
	</div>
</div>

<% if @author.videos.present? %>
<div class="row">
	<%= content_tag(:h2, t(:speaker_video_samples)) %>
</div>
<div class="row" id="author-videos" data-hook='author-videos'>
	<% @author.videos.each do |video| %>
	<div class="<%= cycle('alpha', 'omega') %> columns eight">
		<%= render 'spree/products/video_player', :video => video, :html_options => { :width => 400 } %>
	</div>
	<% end %>
</div>
<% end %>

<div class="row" id="author-products">
	<%= render 'products', :author => @author %>
</div>
<% end %>
Hide video markup when none are available
Hide video markup when none are available
