<!-- indi:item_description -->

<div id="item_menu" class="testtba">
    {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 || $shopArticle->wdocuments || $shopArticle->herstellerinfo}
            <a title="Sicherheitsinformationen" href="#tabs_5" rel="tabs_5" id="item_tab_trigger_5" class="tab_wrapper selected">
                <span>Sicherheitsinformationen</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">
                <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">
		<!-- Beschreibung -->
		{include file='article_detail/tab_main.tpl'}
		</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">

			<div id="safetyAccordion" class="accordion-container">
			<!-- Sicherheitswarnungen -->
			<h3>Sicherheitswarnungen</h3>
			<div>
				{include file='safety_informations/safety_warnings.tpl'}
			</div>
			<!-- Sicherheitsdokumente -->
			<h3>Sicherheitsdokumente</h3>
			<div>
				{include file='safety_informations/safety_documents.tpl'}
				{include file='safety_informations/earlier_documents.tpl'}
			</div>
			<!-- Herstellerinformationen -->
			<h3>Produktsicherheitsverstoß melden / Herstellerinformation</h3>
			<div>
				{include file='manufacturer_info.tpl'}
			</div>
			</div>
		
		</div>

	{/if}

	
</div>





<!-- jQuery UI Accordion Initialisierung -->
<script>
    $(function() {
        $("#safetyAccordion").accordion({
            collapsible: true,
            heightStyle: "content"
        });
    });
</script>
