<div id="header">
	<div id="top_container">
		<ja:if test="<%= customHeader != null && customHeader.length() > 0 %>">
			${customHeader}
		</ja:if>
		<ja:if test="<%= showTitles %>">
			<% showHomeLink = homeLink != null && homeLink.length() > 0 && !"http://".equals(homeLink); %>		
			<h1><ja:if test="<%= showHomeLink %>"><a href="${homeLink}">$text.content.home</a> &raquo; </ja:if><%= writePath("&raquo;") %></h1>
		</ja:if>
		<ja:if test="<%= showDescriptions %>">
			<ja:if exists="comment">
				<p class="description">${comment}</p>
			</ja:if>
			<ja:else>
				<ja:if exists="description">
					<p class="description">${description}</p>
				</ja:if>
			</ja:else>
		</ja:if>		
		<ja:if exists="indexNum">
			<ja:include page="includes/paging.inc" />
			<h2>$text.content.page: <%= paging %></h2>
		</ja:if>
	</div>	
	<ja:if test="<%= folders %>">
		<div id="folders_container">
			<ul class="folders">
				<ja:fileiterator dirs="true">
					<li>						
						<a href="${closeupPath}">								
							<span>${title}</span>
							<ja:if not exists="iconPath">
								<img src="${thumbPath}" alt="${title}" title="${title}" style="width: ${thumbWidth}px; height: ${thumbHeight}px;" />
							</ja:if>
							<ja:else>
								<% folderIconSize = maxThumbWidth;
								folderIconMargin = 0;
								if (maxThumbWidth > maxFolderIconSize) {
									folderIconSize = maxFolderIconSize;
									folderIconMargin = (maxThumbWidth - maxFolderIconSize)/2;
								} %> 
								<img src="${resPath}/folder.png" alt="${title}" title="${title}" style="width: <%= folderIconSize %>px; height: <%= folderIconSize %>px; margin: <%= folderIconMargin %>px;" />
							</ja:else>
 						</a>
					</li>			
				</ja:fileiterator>
				<div class="clear"></div>
			</ul>
			<div class="clear"></div>
		</div>
	</ja:if>
</div>