
{if $system_configuration.item_image_server_uri}
	{assign var=SHOP_DIR value="{$system_configuration.item_image_server_uri}"}		
{/if}

<div id="content_box_popular">
	<div id="content_box_popular_items">
		<div class="title">
			Unsere Bestseller
		</div>
		<div class="items_box">
			{if $popular_items}
				<ul>
				{foreach $popular_items as $popular_item}
					<li class="item_{$popular_item->id} item {if $popular_item@iteration == 1}selected{/if}">
						<div class="item_name">
							<a class="item_box_info" href="/{$popular_item->short_uri}.html">{$popular_item->name|truncate:70:"...":true}</a>
						</div>
						
						<div class="item_image">
							<a class="item_box_image" href="/{$popular_item->short_uri}.html" style="background-image:url({$SHOP_DIR}images/article/overview_{$popular_item->default_image_file_name});"></a>
						</div>
						
						<div class="item_price">
							{if !$no_prices && $popular_item->price_type == "1"}
								{if $popular_item->shop_price_1}
									{if $popular_item->shop_bargain_price_1 > 0}
										<div class="bargain_price">
											<span style="font-size:11px;text-decoration:line-through;color:#555555;">{$popular_item->shop_price_1|number_format:2:',':" "}&nbsp;&euro;</span> {$popular_item->shop_bargain_price_1|number_format:2:',':" "}&nbsp;&euro;
										</div>
									{else}
											{$popular_item->shop_price_1|number_format:2:',':" "}&nbsp;&euro;
									{/if}
								{else}
									auf Anfrage
								{/if}
							{else}
								auf Anfrage
							{/if}
						</div>
						
						<div class="item_image_detailed">
							<a href="/{$popular_item->short_uri}.html"><img src="{$SHOP_DIR}images/article/details_{$popular_item->default_image_file_name}" /></a>
						</div>
					</li>
				{/foreach}
				</ul>
			{/if}
		</div>
		<div class="tabs_box">
			{if $popular_items}
				<ul>
				{foreach $popular_items as $popular_item}
					<li class="item_{$popular_item->id} {if $popular_item@iteration == 1}selected{/if}">
							<a href="item_{$popular_item->id}">{$popular_item@iteration}</a>
					</li>
				{/foreach}
				</ul>
			{/if}
		</div>
	</div>
	
	<div id="content_box_popular_manufacturers">
		<h4>Best Brands</h4>
		{if $popular_manufacturers}
			<ul>
			{foreach $popular_manufacturers as $popular_manufacturer}
				<li>
					<div class="manufacturer_box manufacturer_box_{$popular_manufacturer@iteration}">
						<span class="manufacturer_logo" style="background-image:url({$SHOP_DIR}images/manufacturers/{$popular_manufacturer->logo});"> </span><!-- repeat center center -->
						<!-- <img class="manufacturer_logo" src="{$SHOP_DIR}images/manufacturers/{$popular_manufacturer->logo}" alt="{$popular_manufacturer->name}" /> -->
						<span class="manufacturer_name">{$popular_manufacturer->name}</span>
						<span class="manufacturer_items_in_shop">Artikel: {$popular_manufacturer->items_in_shop}</span>
						<a class="manufacturer_link" href="/Kaufen/{$popular_manufacturer->short_uri}/">Alle Artikel</a>
					</div>
				</li>
			{/foreach}
			</ul>
		{/if}
	</div>
</div>

<script type="text/javascript" src="{$PARENT_THEME_DIR}/media/js/content_box_popular.js"></script>