<div class="tresc">
	<h1 class="title">{$objElement->GetName()}</h1>
	{if $objElement->GetSubname()}
		<div class="subTitle"> {$objElement->GetSubname()}</div>
	{/if}

	{if isset($idCategory) && $idCategory != 1 && isset($labelDetal)}

		<h1>{$objArticle->GetTitle()}</h1>
		{if $objArticle->GetPicture()}
			<div class="newsImg"><img src="{$objArticle->GetPictureUrl()}" alt="{$objArticle->GetTitle()}" title="{$objArticle->GetTitle()}" border="0"/></div>
			{/if}
		
		
		{assign var=descriptionArray value=$objArticle->GetDescriptionArray()}		
		{foreach  from=$descriptionArray name=article item=article key=key}
			<div id="page_{$key+1}" {if $smarty.foreach.article.first}{else}style="display: none;"{/if}>{$article|replace:'<ul>':'<ul class="arrowPointers">'}</div>
		{/foreach}

		{ if $descriptionArray|@count > 1 }
			<center>
				<div>
					{foreach  from=$descriptionArray name=pagi item=article key=key}
						<a href="#" id="link_{$key+1}" {if $smarty.foreach.pagi.first}style="color: red; font-weight: bold;"{/if}  onclick="{foreach from=$descriptionArray item=art key=i} document.getElementById('page_{$i+1}').style.display = 'none'; document.getElementById('link_{$i+1}').innerHTML = '{$i+1}'; document.getElementById('link_{$i+1}').style.color = '';{/foreach} document.getElementById('page_{$key+1}').style.display = ''; document.getElementById('link_{$key+1}').innerHTML = '<b>{$key+1}</b>'; document.getElementById('link_{$key+1}').style.color = 'red';"> {$key+1} </a>&nbsp;
					{/foreach}
				</div>	
			</center>	
		{ /if }		

		<div class="back"><a href="javascript:history.back();">{translate word='back'}</a></div>


	{else}

{if $lang == 'pl'}
		{assign var=kontakt value='http://www.ogiela.pl/pl/formularz_zapytania'} 
		{else}
		{assign var=kontakt value='http://www.ogiela.pl/en/contact_form'} 
		{/if}

		{$objArticle->GetDescription()|replace:'#KONTAKT#':$kontakt}
		<div class="imagesList">
		{foreach from=$arrayImage item=image key=key name=imageGallery}
			<a class="gallery normalImg{if $smarty.foreach.imageGallery.index > 3} SubImage_imageGallery{/if}"  href="{$image->GetFullUrlId($objArticle->GetId())}" {if $smarty.foreach.imageGallery.index > 3}style="display: none;" {/if}>
				{assign var=imageGallery value=$image->GetFullPathOrgId($objArticle->GetId())}
				{thumb file=$imageGallery longside=false shortside=false width="250" height="160" link='false' crop=true }
				{*<img src="{$image->GetFullUrlMiniId($objArticle->GetId())}" width="120" height="60" alt="" style="border: 1px solid white;" />*}
			</a>
		{/foreach}
		{if $smarty.foreach.imageGallery.index > 3}
					<div class="moreImage" id="moreImage"><a href="#" onclick="$('.SubImage_imageGallery').show('slow'); $('#lessImage').show(); $('#moreImage').hide(); return false; " >{translate word='more'}</a></div>
					<div class="lessImage" id="lessImage"><a href="#" onclick="$('.SubImage_imageGallery').hide('slow'); $('#moreImage').show(); $('#lessImage').hide(); return false;" >{translate word='less'}</a></div>
				{/if}
		</div>
		<div>&nbsp;</div>

		{foreach from=$articleList item=articleSubObj}
			<h1>{$articleSubObj->GetTitle()}</h1>
				{$articleSubObj->GetDescription()}
			<div class="imagesList">
				
				{assign var=imageSubGallery value=$articleSubObj->getArrayImage()}
				{assign var=idSubGallery value=$articleSubObj->getId()}
				{foreach $imageSubGallery as $imageSub}
{*				{foreach from=$imageSubGallery item=imageSub name=%$idSubGallery%}					*}
					<a rel="{$idSubGallery}" class="gallery normalImg {if $imageSub@index > 3}SubImage_{$idSubGallery}{/if}"  href="{$imageSub->GetFullUrlId($articleSubObj->GetId())}" {if $imageSub@index > 3}style="display: none;" {/if}>
						{assign var=imageGallery value=$imageSub->GetFullPathOrgId($articleSubObj->GetId())}
						{thumb file=$imageGallery longside=false shortside=false width="250" height="160" link='false' crop=true }
						{*<img src="{$imageSub->GetFullUrlMiniId($articleSubObj->GetId())}" width="120" height="60" alt="" style="border: 1px solid white;" />*}
					</a>
				{/foreach}
				{if $imageSub@index > 3}
					<div class="moreImage" id="moreImage{$idSubGallery}"><a href="#" onclick="$('.SubImage_{$idSubGallery}').show('slow'); $('#lessImage{$idSubGallery}').show(); $('#moreImage{$idSubGallery}').hide(); return false; " >{translate word='more'}</a></div>
					<div class="lessImage" id="lessImage{$idSubGallery}"><a href="#" onclick="$('.SubImage_{$idSubGallery}').hide('slow'); $('#moreImage{$idSubGallery}').show(); $('#lessImage{$idSubGallery}').hide(); return false;" >{translate word='less'}</a></div>
				{/if}
			</div>
		{/foreach}
<div>&nbsp;</div>
	{/if}

	<div class="cb"></div>
</div>
