<div id="tools" class="portlet first_page ui-widget ui-widget-content ui-helper-clearfix ui-corner-all">
    <div style="position: relative;">
        <div style="z-index: 9999; position: absolute; right: 3px; top: 3px; cursor: pointer;" onclick="Cancel($('.edit_section :first').parents('.portlet'));">
            <img src="{$site_root}{$template_root}/images/controls/icn_close_white.gif" alt="{$lang.builder.close_tools}" title="{$lang.builder.close_tools}">
        </div>
    </div>
	<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
        <div style="overflow: hidden;">
			<li><a style="outline: none;" href="#tools-7">{$lang.builder.self_portrait}</a></li>
	        <li class="highlighttab"><label title="{$lang.builder.used_in_perfectmatch}"><a style="outline: none;"  href="#tools-1">{$lang.builder.interests}</a></label></li>
			<li class="highlighttab"><label title="{$lang.builder.used_in_perfectmatch}"><a style="outline: none;"  href="#tools-3">{$lang.builder.partner_interests}</a></label></li>
		</div>
        <div style="overflow: hidden; padding: 10px 0;">
			<li class="highlighttab"><label title="{$lang.builder.used_in_perfectmatch}"><a style="outline: none;"  href="#tools-4">{$lang.builder.description}</a></label></li>
			<li class="highlighttab"><label title="{$lang.builder.used_in_perfectmatch}"><a style="outline: none;"  href="#tools-2">{$lang.builder.partner_criteria}</a></label></li>
	        <li><a style="outline: none;" href="#tools-8">{$lang.builder.custom}</a></li>
		</div>
		<div style="overflow: hidden;">
			<li><a style="outline: none;" href="#tools-5">{$lang.builder.personal}</a></li>
			<li><a style="outline: none;" href="#tools-6">{$lang.builder.personality}</a></li>
	        {if $tabs eq 0}
				<li ><a style="outline: none;" href="#tools-9">{$lang.builder.upload}</a></li>
			{/if}
		</div>
	</ul>
	<div id="tools-7" class="portrait" style="width:375px;">
		<div class="toolbox" style="width: 350px;">
			{$lang.builder.help_add_element}
			<ul class="draw_area" style="list-style-type: none; margin: 0; padding: 0; width: 60%;" >{strip}
			{foreach item=item from=$elements name=elements}
            {if $item.category eq 'portrait'}
                {if $tabs eq 0 && $item.is_system eq '0' && $item.page eq '0'}
                    {include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
                {/if}
                {if $tabs eq 2 && $item.adv_search eq '0' && $item.page_position > 0}
                    {include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
                {/if}
                {if $tabs eq 1 && $item.quick_search eq '0' && $item.page_position > 0}
                    {include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
                {/if}
                {if $tabs eq 3 && $item.perfect_match eq '0' && $item.page_position > 0}
                    {include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
                {/if}
            {/if}
			{/foreach}
			{/strip}</ul>
		</div>
	</div>
	<div id="tools-1" class="interests" style="width:375px;">
		<div class="toolbox" style="width: 350px;">
			{$lang.builder.help_add_element}
			<ul class="draw_area" style="list-style-type: none; margin: 0; padding: 0; width: 60%;" >{strip}
			{foreach item=item from=$elements name=elements}
            {if $item.category eq 'interests'}
                {if $tabs eq 0 && $item.is_system eq '0' && $item.page eq '0'}
                    {include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
                {/if}
                {if $tabs eq 2 && $item.adv_search eq '0' && $item.page_position > 0}
                    {include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
                {/if}
                {if $tabs eq 1 && $item.quick_search eq '0' && $item.page_position > 0}
                    {include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
                {/if}
                {if $tabs eq 3 && $item.perfect_match eq '0' && $item.page_position > 0}
                    {include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
                {/if}
            {/if}
			{/foreach}
			{/strip}</ul>
		</div>
	</div>
	<div id="tools-3" class="partner_interests" style="width:375px;">
		<div class="toolbox" style="width: 350px;">
			{$lang.builder.help_add_element}
			<ul class="draw_area" style="list-style-type: none; margin: 0; padding: 0; width: 60%;" >{strip}
			{foreach item=item from=$elements name=elements}
            {if $item.category eq 'partner_interests'}
                {if $tabs eq 0 && $item.is_system eq '0' && $item.page eq '0'}
                    {include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
                {/if}
                {if $tabs eq 2 && $item.adv_search eq '0' && $item.page_position > 0}
                    {include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
                {/if}
                {if $tabs eq 1 && $item.quick_search eq '0' && $item.page_position > 0}
                    {include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
                {/if}
                {if $tabs eq 3 && $item.perfect_match eq '0' && $item.page_position > 0}
                    {include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
                {/if}
            {/if}

			{/foreach}
			{/strip}</ul>
		</div>
	</div>

	<div id="tools-4" class='description' style="width:375px;">
		<div class="toolbox" style="width: 350px;">
			{$lang.builder.help_add_element}
			<ul class="draw_area" style="list-style-type: none; margin: 0; padding: 0; width: 60%;" >
			{foreach item=item from=$elements name=elements}
            {if $item.category eq 'description'}
                {if $tabs eq 0 && $item.is_system eq '0' && $item.page eq '0'}
                    {include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
                {/if}
                {if $tabs eq 2 && $item.adv_search eq '0' && $item.page_position > 0}
                    {include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
                {/if}
                {if $tabs eq 1 && $item.quick_search eq '0' && $item.page_position > 0}
                    {include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
                {/if}
                {if $tabs eq 3 && $item.perfect_match eq '0' && $item.page_position > 0}
                    {include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
                {/if}
            {/if}
			{/foreach}
			</ul>
		</div>
	</div>
	<div id="tools-2" class="partner_criteria" style="width:375px;">
		<div class="toolbox" style="width: 350px;">
			{$lang.builder.help_add_element}
			<ul class="draw_area" style="list-style-type: none; margin: 0; padding: 0; width: 60%;" >{strip}
			{foreach item=item from=$elements name=elements}
            {if $item.category eq 'partner_criteria'}
                {if $tabs eq 0 && $item.is_system eq '0' && $item.page eq '0'}
                    {include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
                {/if}
                {if $tabs eq 2 && $item.adv_search eq '0' && $item.page_position > 0}
                    {include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
                {/if}
                {if $tabs eq 1 && $item.quick_search eq '0' && $item.page_position > 0}
                    {include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
                {/if}
                {if $tabs eq 3 && $item.perfect_match eq '0' && $item.page_position > 0}
                    {include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
                {/if}
            {/if}

			{/foreach}
			{/strip}</ul>
		</div>
	</div>

	<div id="tools-8" class="custom" style="width:375px;">
		<div class="toolbox" style="width: 350px;">
			{$lang.builder.help_add_element}<br>
            {$lang.builder.help_add_custelement}
			<ul class="draw_area" style="list-style-type: none; margin: 0; padding: 0; width: 60%;" >{strip}
                {if $tabs eq 0}
				<li class="edit_section_no_cursor custom" category="custom" id_elem="custom_text" element_type="input_element">
					<table width="315px" style="padding-left:5px;">
						<tr>
							<td>
								<img id_elem="{$item.id}" class="info" src="{$site_root}{$template_root}/images/controls/information.png">
							</td>
							<td width="100%" class="elem_small_text" mandatory="0">
								{$lang.builder.text}
							</td>
							<td width="0%" class="control" style="">
								<div class="control" style="position: relative;">
                                    <div style="position: absolute; right: -55px; top: -9px; cursor: pointer;">
                                        <img alt="{$lang.builder.add_elem}" title="{$lang.builder.add_elem}" class="deleteadd" src="{$site_root}{$template_root}/images/controls/plus.png">
                                    </div>
                                    <div style="position: absolute; right: -20px; top: -10px; cursor: pointer; display:none;" class="div_editelem">
                                        <img alt="{$lang.builder.edit_elem}" title="{$lang.builder.edit_elem}" class="editelement" src="{$site_root}{$template_root}/images/controls/icn_edit.gif">
                                    </div>
								</div>
							</td>
                            <td width="0%">
                            </td>
						</tr>
					</table>
				</li>
                {/if}
			{foreach item=item from=$elements name=elements}
            {if $item.category eq 'custom'}
                {if $tabs eq 0 && $item.is_system eq '0' && $item.page eq '0'}
                    {include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
                {/if}
                {if $tabs eq 2 && $item.adv_search eq '0' && $item.page_position > 0}
                    {include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
                {/if}
                {if $tabs eq 1 && $item.quick_search eq '0' && $item.page_position > 0}
                    {include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
                {/if}
                {if $tabs eq 3 && $item.perfect_match eq '0' && $item.page_position > 0}
                    {include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
                {/if}
            {/if}

			{/foreach}
			{/strip}</ul>
		</div>
	</div>
	<div id="tools-5" class='personal' style="width:375px;">
		{$lang.builder.help_add_element}
		<div class="toolbox" style="width: 350px;">
			<ul class="draw_area" style="list-style-type: none; margin: 0; padding: 0; width: 60%;" >
			{foreach item=item from=$elements name=elements}
            {if $item.category eq 'personal'}
                {if $tabs eq 0 && $item.is_system eq '0' && $item.page eq '0'}
                    {include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
                {/if}
                {if $tabs eq 2 && $item.adv_search eq '0' && $item.page_position > 0}
                    {include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
                {/if}
                {if $tabs eq 1 && $item.quick_search eq '0' && $item.page_position > 0}
                    {include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
                {/if}
                {if $tabs eq 3 && $item.perfect_match eq '0' && $item.page_position > 0}
                    {include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
                {/if}
            {/if}

			{/foreach}
			</ul>
		</div>
	</div>

	<div id="tools-6" class="personality" style="width:375px;">
		<div class="toolbox" style="width: 350px;">
			{$lang.builder.help_add_element}
			<ul class="draw_area" style="list-style-type: none; margin: 0; padding: 0; width: 60%;" >
			{foreach item=item from=$elements name=elements}
            {if $item.category eq 'personality'}
                {if $tabs eq 0 && $item.is_system eq '0' && $item.page eq '0'}
                    {include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
                {/if}
                {if $tabs eq 2 && $item.adv_search eq '0' && $item.page_position > 0}
                    {include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
                {/if}
                {if $tabs eq 1 && $item.quick_search eq '0' && $item.page_position > 0}
                    {include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
                {/if}
                {if $tabs eq 3 && $item.perfect_match eq '0' && $item.page_position > 0}
                    {include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
                {/if}
            {/if}

			{/foreach}
			</ul>
		</div>
	</div>
    {if $tabs eq 0}
	<div id="tools-9" class="upload" style="width:375px;">
		<div class="toolbox" style="width: 350px;">
			{$lang.builder.help_add_element}
			<ul class="draw_area" style="list-style-type: none; margin: 0; padding: 0; width: 60%;" >{strip}
			{foreach item=item from=$elements name=elements}
			{if $tabs eq 0 && $item.is_system eq '0' && $item.page eq '0' && $item.category eq 'upload'}
				{include file="$site_path/$admin_theme_path/admin_builder_li.tpl"}
			{/if}
			{/foreach}
			{/strip}</ul>
		</div>
	</div>
    {/if}
</div>