<{assign var="images" value=$product->getImages()}>

<{if $images[1]}>

	<figure class="product">
		<a href="<{$product->getRemoteUrl()|escape}>"
			class="productEntity"
			data-product_name="<{$product->getName()}>"
			data-product_id="<{$product->getProductId()}>"
			data-product_price="<{$product->getRealPrice()}>"

			<{if $product->getBrand()}> data-product_brand="<{$product->getBrandName()}>"<{/if}>

			<{if $product->getMainCategory()}>
				data-product_category="<{$product->getMainCategoryName()}>"
			<{elseif $product->getCategory()}>
				data-product_category="<{$product->getCategoryName()}>"
			<{/if}>

			data-productlist_position="<{$smarty.section.productlist.iteration}>"

			<{if $category}>
				data-productlist_name="<{$category->getName()}>"
			<{elseif $landing_page}>
				data-productlist_name="<{$landing_page->getName()}>"
			<{elseif $inc == "search.html"}>
				data-productlist_name="searchresults"
			<{/if}>
		>
			<div class="mediaholder">

				<{if $images}>
					<img src="<{$images[0]->getSrc(300, 400, 'box')}>" alt="">
				<{else}>
					<img alt="" src="<{$theme_url}>/templates/images/shop_item_01.jpg"/>
				<{/if}>

				<div class="cover">
					<{if $images[1]}>
						<img src="<{$images[1]->getSrc(300, 400, 'box')}>" alt="">
					<{elseif $images[0]}>
						<img src="<{$images[0]->getSrc(300, 400, 'box')}>" alt="">
					<{else}>
						<img alt="" src="<{$theme_url}>/templates/images/shop_item_01_hover.jpg"/>
					<{/if}>
				</div>

				<div class="product-button"><i class="fa fa-arrow-circle-right"></i> Se mere</div>

			</div>

			<section>
				<{*
				<span class="product-category"><{$product->getMainCategoryName()|escape}></span>
				*}>
				<h5><{$product->getName()|escape|truncate:49:"...":true}></h5>
				<span class="product-price"><{$product->getRealPrice()|number_format:2:",":"."}> <{$webshop->getCurrency()}></span>
			</section>
		</a>
	</figure>

<{else}>

	<div class="product">
		<a href="<{$product->getRemoteUrl()|escape}>"
			class="productEntity"
			data-product_name="<{$product->getName()}>"
			data-product_id="<{$product->getProductId()}>"
			data-product_price="<{$product->getRealPrice()}>"
			<{if $product->getBrand()}>
				data-product_brand="<{$product->getBrandName()}>"
			<{/if}>
			<{if $product->getMainCategory()}>
				data-product_category="<{$product->getMainCategoryName()}>"
			<{elseif $product->getCategory()}>
				data-product_category="<{$product->getCategoryName()}>"
			<{/if}>
			data-productlist_position="<{$smarty.section.productlist.iteration}>"
			<{if $category}>
				data-productlist_name="<{$category->getName()}>"
			<{elseif $landing_page}>
				data-productlist_name="<{$landing_page->getName()}>"
			<{elseif $inc == "search.html"}>
				data-productlist_name="searchresults"
			<{/if}>
		>
			<div class="mediaholder">
				<{if $images}>
					<img src="<{$images[0]->getSrc(300, 400, 'box')}>" alt="">
				<{else}>
					<img alt="" src="<{$theme_url}>/templates/images/shop_item_01.jpg" style="height:160px;width:100%;"/>
				<{/if}>

				<div class="product-button"><i class="fa fa-arrow-circle-right"></i> Se mere</div>
			</div>

			<section>
				<{*
				<span class="product-category"><{$product->getMainCategoryName()|escape}></span>
				*}>
				<h5><{$product->getName()|escape|truncate:49:"...":true}></h5>
				<span class="product-price"><{$product->getRealPrice()|number_format:2:",":"."}> <{$webshop->getCurrency()}></span>
			</section>
		</a>
	</div>

<{/if}>