{include file="lc_album/album_toolbar.tpl"}

<h1><img style="width: 70px;" src="{$album->logo_file|default:"/skins/default/lc_album/images/album_icon.png"}" alt="{$album->name|escape}" /> {$album->name|escape}</h1>
<div class="describe">{$album->describe_html}</div>
<div id="album_images">
{foreach $images as $image}
	<div class="item">
		<a href="{url action="image" var1=$image.image_id}" title="{$image.name|escape}"><img src="{$image.files.small}" alt="{$image.name|escape}" /></a>
		<a href="{$image.files.original}"   title="Полный размер" class="images" rel="{$image.counter}"></a>
		{if access('admin')}<a href="{url action="set_logo" var1=$image.image_id token=1}" class="set_logo" title="Сделать это изображение обложкой альбома"></a>{/if}

	</div>
{/foreach}
</div>
<div class="clear"></div>
<script type="text/javascript">
	window.addEvent('domready', function(){ 
		milkbox = new Milkbox();
		milkbox.addGalleries('{url action="album" var1=$album->id type="xml"}');
		
		$$('.images').addEvent('click', function(e){
			e.preventDefault();
			milkbox.showGallery({ gallery:'{$album->name|escape}', index:parseInt(this.rel), autoplay:false, delay:7 })
		});

	});
</script>

{if $pager.total>1}
	<div class="pagination" id="pagination">
		{foreach $pager.labels as $key=>$label}
			{if !$label} ... {elseif $pager.pages.$key==$pager.current} 
				<b>{$label}</b>
			{else}
				<a href="{url action='album' var1=$album->id var2=$pager.pages.$key}">{$label}</a>
			{/if}
		{/foreach}
	</div>
{/if}

{* комментарии *}
{nocache}
	{if $comments}
		{include file="admin_pages/comments.tpl"}
	{/if}
{/nocache}