{include file="$gentemplates/$header_tpl"}

<div>
	{if $banner.right}
		<div style="padding-top: 12px;">
			<div style="float: left;">
				{$banner.right}
			</div>
		</div>
	{/if}
	<div class="search_form_table">
		<h1>{$lang.section.q_search}</h1>
		<div>&nbsp;</div>
		{strip}
		<!-- main tabs -->	
		<div class="main_tabs">
			<div class="tab_block first">
				<a href="?type_search=0" onclick="">{$lang.section.q_search}</a>
			</div>
			<div class="tab_block">
				<a href="?type_search=2" onclick="">{$lang.search.search_2_name}</a>
			</div>
			<div class="tab_block">
				<a href="?type_search=4" onclick="">{$lang.search.search_4_name}</a>
			</div>
			<div class="tab_block active">
				<a href="?type_search=5" onclick="">{$lang.search.search_5_name}</a>
			</div>
		</div>
		<!-- end main tabs -->		
		{/strip}  

		{if $tags}
			<!-- tags quick search -->
			<div class="search_content">
				<div>
					{section name=s loop=$tags}
						<a href="{$tags[s].searchlink}" title="{$tags[s].count}" style="font-size: {$tags[s].size}px">
							{$tags[s].tag}
						</a>&nbsp;&nbsp;
					{/section}
				</div>
			</div>
		  <!-- /tags quick search -->
		{/if}
    </div>
        
	<!-- targeting section -->
	{strip}
	{if $targeting}
		<script type="text/javascript" src="{$site_root}{$template_root}/js/jquery/jquery.jcarousel.min_search.js"></script>
		<link href="{$site_root}{$template_root}{$template_css_root}/jquery/carousel.css" rel="stylesheet" type="text/css" media="all">
		<div class="content" style="padding-right: 12px;padding-top:20px;">			
			<div class="carousel">
				<h3 class="p-b5">{$targeting_header}</h3>
				<ul id="mycarousel" class="jcarousel-skin-dating">
					{foreach key=key item=item from=$targeting name=visited}
						{if !$item.couple}
							{assign var=id_couple value=$item.id_user_pair}
							<li style="height:150px;">
								<a href="{$item.link}">
									<img alt="" class="icon" src="{$item.icon_path}" width="{$big_thumb_max_width}" height="{$big_thumb_max_height}"/>
								</a>
								{if $id_couple}
									<a href="{$targeting[$id_couple].link}" class="couple_icon" style="position:absolute; left: 5px; top: 0; display:none;">
										<img alt="" class="icon imgcanvas" src="{$targeting[$id_couple].icon_path}" width="{$big_thumb_max_width}" height="{$big_thumb_max_height}"/>
									</a>
								{/if}
								<div class="text-overflow" style="padding-top:5px;">
									<a href="{$item.link}">{$item.name}</a>{if $id_couple} + <a href="{$targeting[$id_couple].link}">{$targeting[$id_couple].name}</a>{/if}
								</div>
								<div style="padding-top:5px;">
									{$item.age}{if $id_couple}&nbsp;+&nbsp;{$targeting[$id_couple].age}{/if} {$lang.home_page.ans}
								</div>
							</li>
						{/if}
					{/foreach}
				</ul>
			</div>					
		</div>
	{/if}
    {/strip}
	<!-- targeting section -->
	   
	<!-- direct quick search -->
	{strip}
		<div class="overflowhidden">
        <form action="{$form.search_action}" method="post" name="search_form_3" style="margin:0px">
			<div class="content content_adult_2">
				<h3 class="p-b5">{$lang.search.search_3_name}</h3>
				<div class="direct_quick_search">
					<p><a href="{$site_root}/{$seo.new_faces}">{$header_s.new_faces}</a></p>
					<p><a href="{$site_root}/{$seo.top_users}">{$header_s.top_users}</a></p>
					<p><a href="{$site_root}/{$seo.photo_gallery}">{$header_s.photo_gallery_latest}</a></p>
				</div>
				<div class="direct_quick_search">
					<p><a href="{$site_root}/{$seo.video_gallery_latest}">{$header_s.video_gallery_latest}</a></p>
					<p><a href="{$form.search_3_birthday}">{$header_s.search_3_birthday}</a></p>
					<p><a href="{$form.search_3_online}">{$header_s.search_3_online}</a></p>
				</div>
				<div class="direct_quick_search">
					<p><a href="{$form.search_3_hotlist}">{$header_s.search_3_hotlist}</a></p>
					<p><a href="{$form.search_3_new}">{$header_s.search_3_new}</a></p>
				</div>
          </div>
        </form>
        </div>
		{if $banner.right}
		<div style="padding-top: 12px;">
			<div style="float: left;">
				{$banner.right}
			</div>
		</div>
		{/if}	  						  
    {/strip}
	<!-- /direct quick search -->
	
  </div>
</div>
  
<script language="JavaScript" type="text/javascript">
{literal}
	$(document).ready(function() {
		$('#mycarousel').jcarousel();
	}); 
	
$('select').live("change",(function(){
	val = $(this).val();
	name = $(this).attr('name');
	if (name == "id_country") {
		$.post(SEO_SITE_ROOT+"/location.php",{sec:'rp',sel:'region', id_country:val},
			function(data){
				$("div #region_div").html(data);
				$("div #city_div select").val(0);
				$("div #city_div select").text('');
			}
		);
	} else if(name == "id_region") {
		$.post(SEO_SITE_ROOT+"/location.php",{sec:'rp',sel:'city', id_region:val},
			function(data){
				$("div#city_div").html(data);
			}
		);
	}
}));
function ZipCodeCheck(zip_value) {
  if (zip_value == '') {
    document.getElementById('within').disabled = false;
    document.getElementById('search_type').value = 1;
  } else {
    document.getElementById('within').checked = false;
    document.getElementById('search_type').value = 2;
    document.getElementById('within').disabled = true;
  }
  return;
}


$('.search_form').find('input[type=radio]').each(function(){
    if($(this).attr('name') != 'looking_for[]'){
        name = $(this).attr('name');
        value = $(this).val();
        var html = '<input type="checkbox" checked="checked" name="'+name+'[]" value="'+value+'" >';
        $(this).after(html).remove();
    }
});
$('.search_form').find('input[type=checkbox]').each(function(){
    if(($(this).attr('name') != 'foto_only') && ($(this).attr('name') != 'online_only')){
        $(this).attr('checked', true);
    }
});

$('select[name=id_language_2]').remove();
$('select[name=id_language_3]').remove();
$('.name_for_lang#preview_1').attr("width", "130px");
{/literal}
var resize=0;
</script>
{include file="$site_path$index_theme_path/like.tpl"}
{include file="$gentemplates/$footer_tpl"}