<!-- indi:item_description -->

<div id="item_menu">
	{if $shopArticle->tab_title}
		{foreach from=$shopArticle->tab_title item=title key=title_id name=titles}
			<a title="{$title}" href="#" rel="tabs_{$title_id}" id="item_tab_trigger_{$title_id}" class="tab_wrapper {if $smarty.foreach.titles.first}active selected{/if}">
				<span>{$title}</span>
			</a>
		{/foreach}
	{else}
		<a title="{$template_text.item_details.description}" href="#tabs_1" rel="tabs_1" id="item_tab_trigger_1" class="tab_wrapper active selected">
			<span>{$template_text.item_details.description}</span>
		</a>
		{if $shopArticle->documents}
			<a href="#tabs_5" rel="tabs_5" class="tab_wrapper selected item_details_tab5">
					<span>{$template_text.item_details.data_sheet}</span>
			</a>
		{/if}
		{if $shopArticle->assignedItemSet && $system_configuration.show_item_item_assign == 1}
			<a title="{$template_text.item_details.menutitle_additional_parts}" href="#tabs_2" rel="tabs_2" id="item_tab_trigger_2" class="tab_wrapper selected">
				<span>{$template_text.item_details.menutitle_additional_parts}</span>
			</a>
		{/if}
		{if $shopArticle->assignedItemSet3}
			<a title="{$template_text.item_details.menutitle_spare_parts}" href="#tabs_3" rel="tabs_3" id="item_tab_trigger_3" class="tab_wrapper selected">
				<span>{$template_text.item_details.real_friends_title}</span>
			</a>
		{/if}
		{if $shopArticle->assignedItemSet2 && $system_configuration.show_item_item_assign2 == 1}
			<a title="{$template_text.item_details.menutitle_spare_parts}" href="#tabs_4" rel="tabs_4" id="item_tab_trigger_4" class="tab_wrapper selected">
				<span>{$template_text.item_details.menutitle_spare_parts}</span>
			</a>
		{/if}
	{/if}

	<div class="clear_left"></div>
</div>

<div id="description_tabs">
	{if $shopArticle->tab_content}
		{foreach from=$shopArticle->tab_content item=content key=content_id name=contents}
			<div class="tab_content {if $smarty.foreach.contents.first}active{/if}" id="tabs_{$content_id}">
				{if $smarty.foreach.contents.first}
					{if $shopArticle->schema_data_attributes}
						<table>
							{foreach from=$shopArticle->schema_data_attributes item=attribute}
								{if $attribute.show_detail && $attribute.value}
									<tr>
										{if $attribute.number != $shopArticle->schema_data->selectable_attribute_1 && $attribute.number != $shopArticle->schema_data->selectable_attribute_2}
											<td>{$attribute.name}</td>
											<td class="attrRight">{$attribute.value} {$attribute.unit}</td>
										{/if}
									</tr>
								{/if}
							{/foreach}
						</table>
						<br />
					{/if}
					{$content}
				{/if}
			</div>
		{/foreach}
	{else}
		<div class="tab_content active" id="tabs_1">
			<a name="suitableFor"></a>

			<div class="container_left">
				<span class="item_description_title">Artikelbeschreibung</span><br /><br />
				{if !$user_lang || $user_lang == $system_configuration.default_system_language || !$shopArticle->detail_description_en}
					{if $shopArticle->detail_description|stristr:"<a"}
						{$shopArticle->detail_description}
					{else}
						{$shopArticle->detail_description|replace:'Batterieverordnung':'<a target="_blank" href="/media/files/Batterieverordnung.pdf">Batterieverordnung</a>'}
					{/if}
				{else}
					{if $shopArticle->detail_description_en|stristr:"<a"}
						{$shopArticle->detail_description_en}
					{else}
						{$shopArticle->detail_description_en|replace:'Batterieverordnung':'<a target="_blank" href="/media/files/Batterieverordnung.pdf">Batterieverordnung</a>'}
					{/if}
				{/if}
				<br><br><br>
				{if !$user_lang || $user_lang == $system_configuration.default_system_language || !$shopArticle->name}
					{$shopArticle->name}
				{else}
					{$shopArticle->name_en}
				{/if}
				{if $shopArticle->manufacturer_data->name}| von {$shopArticle->manufacturer_data->name} {/if}|
				{$structure_data[1]->name} |  sofort lieferbar | www.intelectra-shop.de |
				{*{assign var=item_attr6 value=$shopArticle->attribute_6|replace:";":", "}
				{$item_attr6|replace:",":", "}*}

				{if $shopArticle->youtube_video}
					<br /><center><iframe width="450" height="253" src="http://www.youtube.com/embed/{$shopArticle->youtube_video}?rel=0" frameborder="0" allowfullscreen></iframe></center>
				{/if}
			</div>
			<div class="container_right">
				<span class="item_description_title">Artikelinformationen</span><br>

				<div id="qrcode"></div>

				<div class="attributes_table">
					{if $shopArticle->uvp > 0}
						<p>
							<strong>UVP:</strong>
							{$shopArticle->uvp|number_format:"2":",":"."} &euro;
						</p>
					{/if}

					{if $shopArticle->sample_price && $shopArticle->sample_price > 0 && $shopArticle->sample_unit}
						<p>
							<strong>Grundpreis:</strong>
							{$shopArticle->sample_price|number_format:"2":",":"."} &euro; / {$shopArticle->sample_unit}
						</p>
					{/if}

					{if $shopArticle->schema_data_attributes}
						{$done19 = false}
						{foreach from=$shopArticle->schema_data_attributes item=attribute}
							{if $attribute.show_detail && $attribute.value}
								<p>
									{if $attribute.number != $shopArticle->schema_data->selectable_attribute_2}
										<strong>
											{if !$user_lang || $user_lang == $system_configuration.default_system_language || !$attribute.name_en}
												{$attribute.name}:
											{else}
												{$attribute.name_en}:
											{/if}
										</strong><br>
										{if $attribute.number == 1}
											{$done19 = true}
											{if !empty($shopArticle->attribute_19)}
												<div id="itemMatch"><strong>passend wie / Originalnummer / Ausführung / Aufdruck-11:</strong><br>{$shopArticle->attribute_19}</div>

											{else}
												{foreach from=$shopArticle->match item=attribute}
													<div id="itemMatch"><strong>{$attribute->vertreiber}</strong><br>{$attribute->bestellcode}</div>
												{/foreach}
											{/if}

											{if $attribute.value == 279}
												Bund
											{else if $attribute.value == 278}
												Meter
											{else if $attribute.value == 275}
												Paar
											{else if $attribute.value == 280}
												Pack.  
											{else if $attribute.value == 281}
												Rolle
											{else if $attribute.value == 277}
												Satz
											{else if $attribute.value == 276}
												Set
											{else if $attribute.value == 8}
												Stück
											{else if $attribute.value == 274}
												VP
											{/if}
										{else}
											{$attribute.value|replace:';':'<br>'} {$attribute.unit}
										{/if}
									{/if}
								</p>
							{/if}
						{/foreach}
						{if !$done19}
							<div id="itemMatch"><strong>passend wie / Originalnummer / Ausführung / Aufdruck:</strong><br>{foreach from=$shopArticle->match item=attribute}
								<div id="itemMatch"><strong>{$attribute->vertreiber}</strong><br>{$attribute->bestellcode}</div>
							{/foreach}</div>
						{/if}
					{/if}
				</div>

				<a name="documents" title="Dokumente"></a>
				{if $shopArticle->documents}
					<div class="document_downloads">
						{foreach item=file from=$shopArticle->documents}
							<a target="_blank" title="PDF-Dokument" href="{$SHOP_DIR}documents/article/{$file->file_name}" title="{$file->alt}">
								<strong>Download:</strong> {$file->alt}<br>
								<span>
									PDF-Dokument
									{if $file->size > 0}
										| {($file->size/1024)|number_format:"2":",":"."} kB
									{/if}
								</span>
							</a>
							<br>
						{/foreach}
					</div>
				{/if}
			</div>
			<div class="clear_both"></div>
			{if $shopArticle->geraetezuordnung != '<table border="0" cellpadding="2" cellspacing="0"></table>'}
				<h2>{$shopArticle->name} passend f&uuml;r Ger&auml;t:</h2>
				{$shopArticle->geraetezuordnung}
			{/if}
		</div>
		<div class="tab_content" id="tabs_2">
			<!-- Zubehoer -->
			<a name="additionalitems" title="Zubehör"></a>
			{if $shopArticle->assignedItemSet && $system_configuration.show_item_item_assign == 1}
				{$additionItemListItems=$shopArticle->assignedItemSet}
				{include 'additionitem_box.tpl'}
			{/if}
		</div>
		<div class="tab_content" id="tabs_3">
			<!-- Ersatzteile -->
			<a name="realfriends" title="Alternativartikel"></a>
			{if $shopArticle->assignedItemSet3}
				{$additionItemListItems=$shopArticle->assignedItemSet3}
				{include 'additionitem_box.tpl'}
			{/if}
		</div>
		<div class="tab_content" id="tabs_4">
			<!-- Ersatzteile -->
			<a name="spareparts" title="Ersatzteile"></a>
			{if $shopArticle->assignedItemSet2 && $system_configuration.show_item_item_assign2 == 1}
				{$additionItemListItems=$shopArticle->assignedItemSet2}
				{include 'additionitem_box.tpl'}
			{/if}
		</div>
		<div class="tab_content" id="tabs_5">
			<table border="0" cellspacing="2" callpadding="2">
			{foreach item=file from=$shopArticle->documents}
				<tr>
					<td><img src="{$PARENT_THEME_DIR}/media/images/mime_postscript.png" /></td>
					<td>
					<a class="document" target="_blank" href="{$SHOP_DIR}documents/article/{$file->file_name}" title="{$file->alt}">{if $file->alt}{$file->alt}{else}PDF-Dokument{/if}</a>
					</td>
				</td>
			{/foreach}
			</table>
		</div>
	{/if}
</div>
