<{assign var="elements" value=":"|explode:$data.source}>

<{assign var="type" value=$elements.0}>
<{assign var="id" value=$elements.1}>

<{if $type == "C"}>

	<{assign var="category" value=$webshop->getCategory($id)}>

	<{if $category}>
		<{assign var="products" value=$category->getOnlineProducts($data.limit)}>
	<{/if}>

<{elseif $type == "L"}>

	<{assign var="landing_page" value=$webshop->getLandingPage($id)}>

	<{if $landing_page}>
		<{assign var="products" value=$landing_page->getProducts($data.limit)}>
	<{/if}>

<{/if}>

<{if $products}>

	<{if $size > 4}>

		<!-- Headline -->
		<h3 class="headline"><{$data.headline|escape}></h3>
		<span class="line margin-bottom-0"></span>

		<!-- Carousel -->
		<div class="showbiz-container carousel-container" >

			<!-- Navigation -->
			<div class="showbiz-navigation">
				<div id="showbiz_left_<{$tmi}>" class="sb-navigation-left"><i class="fa fa-angle-left"></i></div>
				<div id="showbiz_right_<{$tmi}>" class="sb-navigation-right"><i class="fa fa-angle-right"></i></div>
			</div>
			<div class="clearfix"></div>

			<!-- Products -->
			<div class="showbiz" data-left="#showbiz_left_<{$tmi}>" data-right="#showbiz_right_<{$tmi}>" data-play="#showbiz_play_<{$tmi}>" >
				<div class="overflowholder">

					<ul>
						<{section name="i" loop=$products}>
							<{assign var="images" value=$products[i]->getImages()}>

							<li>
								<figure class="product">
									<{if $products[i]->getSalePrice()}>
										<div class="product-discount">UDSALG</div>
									<{/if}>
									<div class="mediaholder">
										<a href="<{$products[i]->getRemoteUrl()|escape}>">
											<{if $images}>
												<img src="<{$images[0]->getSrc(300, 300, '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, 300, 'box')}>" alt="">
												<{elseif $images[0]}>
													<img src="<{$images[0]->getSrc(300, 300, 'box')}>" alt="">
												<{else}>
													<img alt="" src="<{$theme_url}>/templates/images/shop_item_01_hover.jpg"/>
												<{/if}>
											</div>
										</a>
										<a href="<{$products[i]->getRemoteUrl()|escape}>" class="product-button"><i class="fa fa-shopping-cart"></i> Se produkt</a>
									</div>

									<a href="<{$products[i]->getRemoteUrl()|escape}>">
										<section>
											<{*
											<span class="product-category"><{$products[i]->getMainCategoryName()|escape}></span>
											*}>
											<h5><{$products[i]->getName()|escape|truncate:19:"...":true}></h5>
											<span class="product-price"><{$products[i]->getRealPrice()|number_format:2:",":"."}> <{$webshop->getCurrency()}></span>
										</section>
									</a>
								</figure>
							</li>

						<{/section}>
					</ul>

					<div class="clearfix"></div>

				</div>
				<div class="clearfix"></div>
			</div>
		</div>

	<{elseif $size > 2}>

		<!-- Headline -->
		<h3 class="headline"><{$data.headline|escape}></h3>
		<span class="line margin-bottom-0"></span>
		<div class="clearfix"></div>

		<ul class="product-list">

			<{section name="i" loop=$products}>
				<{assign var="image" value=$products[i]->getImage()}>

				<li><a href="<{$products[i]->getRemoteUrl()|escape}>">
					<{if $image}>
						<img src="<{$image->getSrc(80, 80, 'box')}>" alt="" />
					<{else}>
						<img src="images/small_product_list_09.jpg" alt="" />
					<{/if}>

					<div class="product-list-desc"><{$products[i]->getName()|escape}>
						<i><{$products[i]->getRealPrice()|number_format:2:",":"."}> <{$webshop->getCurrency()}></i>

						<{assign var="rating" value=$products[i]->getAvgRating()}>
						<{assign var="star_class" value="one"}>

						<{if $rating > 4}>
							<{assign var="star_class" value="five"}>
						<{elseif $rating > 3}>
							<{assign var="star_class" value="four"}>
						<{elseif $rating > 2}>
							<{assign var="star_class" value="three"}>
						<{elseif $rating > 1}>
							<{assign var="star_class" value="two"}>
						<{elseif $rating > 0}>
							<{assign var="star_class" value="one"}>
						<{/if}>

						<div class="rating <{$star_class}>-stars">
							<div class="star-rating"></div>
							<div class="star-bg"></div>
						</div>

					</div>
				</a></li>

			<{/section}>

			<li><div class="clearfix"></div></li>

		</ul>

	<{else}>

		<dl>
			<{section name="i" loop=$products}>
				<dd><a href="<{$products[i]->getRemoteUrl()|escape}>"><{$products[i]->getName()|escape}></a></dd>
			<{/section}>
		</dl>

	<{/if}>

<{/if}>