<!--$form.links -->
{if $form.page eq '1'}
<!--main catalog-->
  {strip}
{if $form.par eq 'search'}
     <div id="index_quick_search" class="index_quick_search search_form_hide_show" style="margin: 0 0 10px 0; padding:10px;">
        <form name="search_form" action="giftshop.php" method="post" id="s_form">
            <div class="float_left">
                <div>{$lang.button.search}:</div>
                <div class="search_input" style=" width: 370px; display:table; background-color: #FFFFFF;">
                    <input type="hidden" name="sel" value="search_gifts">
                    <input type="hidden" name="par" value="{$category_active.id}">
                    <div>
                        <input class="float_left" type="text" style="border: 0 none; background-color: #FFFFFF;" name="search_name" maxlength="200" />
                    </div>
                    <a style="margin-top: -6px;margin-bottom:-7px;" onclick="javascript: document.search_form.submit();" class="big-search-lupa float_right">&nbsp;</a>			
                </div>
            </div>
        </form>
        </div>
	
	<div style="width:100%;display:table;">
		<!-- search list -->
		{if $form.links_top}
		<div style="display:table;width:100%;" class="pagination_top">	
			<div class="float_right" style="padding: 15px 0 0;">
				<div class="b-page-n">
					{foreach item=item from=$form.links_top name=links}			
						{if $smarty.foreach.links.first}
							{$lang.general.showing}&nbsp;{$current_page}&nbsp;{$lang.general.of}&nbsp;{$num_page}&nbsp;
						{/if}
						{if $item.previous_page eq 1}
							<a href="{$item.link}" class="back-page-act" id="back-page-act_top" alt="{$lang.general.back}" title="{$lang.general.back}">&nbsp;</a>
						{elseif $item.previous_page eq 2}
							<a href="javascript: void(0);" class="back">&nbsp;</a>
						{/if}
						{if $item.next_page eq 1}
							<a href="{$item.link}" class="next-page-act" id="next-page-act_top" alt="{$lang.general.next}" title="{$lang.general.next}">&nbsp;</a>
						{elseif $item.next_page eq 2}
							<a href="javascript: void(0);" class="next">&nbsp;</a>
						{/if}
					{/foreach}
				</div>
			</div>
		</div>
		{/if}
		<div class="content">
			<p>{$category_name}</p>
			{foreach key=key item=item from=$items_list name=te}
				<div style="margin: 10px 0;  padding: 0px; overflow:hidden;">
					{if $item.thumb_icon_path}
						<div style="width:{$settings.thumb_max_width+10}px" class="text float_left" >
							<a class="imgcanvas_container" href="{$form.view_link}&item={$item.id}&id_category={$category_active.id}">
								<img src="{$item.thumb_icon_path}" class="icon imgcanvas" alt="">
							</a>
						</div>
					{/if}
					<div class="text float_left" style="padding-{$default_left}: 0px; padding-{$default_right}: 15px;width:{if $item.thumb_icon_path}523px{else}623px{/if};">
						<p>
							<a href="{$form.view_link}&item={$item.id}&id_category={$category_active.id}">{$item.name}</a>
						</p>
						<p>{$item.comment}</p>
						<p>{$lang.giftshop.category}:<a href="{$form.subcat_link}&id_category={$item.id_category}">{$item.category}</a></p>
						<p>
							<input type="button" class="button" onclick="javascript:location.href='{$form.basket_add_link}&item={$item.id}&id_category={$category_active.id}';" value="{$header.item_add_to_basket}">
						</p>
					</div>
					<div style="width:65px;" class="float_left">
						{$item.price}&nbsp;{$form.curency}
					</div>
				</div>
			{/foreach}
		</div>
		{if $form.links_bottom}
		<div class="search_link">
			<div class="sorting-long">
			<div class="b-page-n">	
				{foreach item=item from=$form.links_bottom}
					{if $item.first_page eq 1}
						<a href="{$item.link}" class="first-page-act">&nbsp;</a>
					{elseif $item.first_page eq 2}
						<a href="javascript: void(0);" class="first-page">&nbsp;</a>
					{/if}
					
					{if $item.previous_page eq 1}
						<a href="{$item.link}" class="back-page-act" id="back-page-act_bottom" alt="{$lang.default_select.back}" title="{$lang.default_select.back}">&nbsp;</a>
					{elseif $item.previous_page eq 2}
						<a href="javascript: void(0);" class="back">&nbsp;</a>
					{/if}
					
					{if $item.selected}
						<a href="javascript: void(0);" class="act-page">{$item.name}</a>
					{else}
						<a href="{$item.link}">{$item.name}</a>
					{/if}
					
					{if $item.delimiter}
						{$item.delimiter}
					{/if}
					
					{if $item.next_page eq 1}
						<a href="{$item.link}" class="next-page-act" id="next-page-act_bottom" alt="{$lang.default_select.next}" title="{$lang.default_select.next}">&nbsp;</a>
					{elseif $item.next_page eq 2}
						<a href="javascript: void(0);" class="next">&nbsp;</a>
					{/if}
						
					{if $item.last_page eq 1}
						<a href="{$item.link}" class="last-page-act">&nbsp;</a>
					{elseif $item.last_page eq 2}
						<a href="javascript: void(0);" class="last-page">&nbsp;</a>
					{/if}	
				{/foreach}
			</div>
			</div>
		</div>
		{/if}
		<!-- /search list -->
		{* {if $banner.right}<div class="float_left">{$banner.right}</div>{/if}	*}
	</div>
{else}
	<div id="index_quick_search" class="index_quick_search search_form_hide_show" style="margin: 0 0 10px 0; padding:10px;">
		<!--form class="search_form_hide_show" name="search_form" action="giftshop.php" method="post" style="padding:10px; margin-top: 0;">
			<input type="hidden" name="sel" value="search_gifts">
			<p>{$lang.button.search}:</p>
			<div class="keywords-box" style="height:21px; width:369px;">
				<input type="text" name="search_name" size="30" style="width:335px;border: 0 none; background-color: #FFFFFF;">
				<a class="big-search-lupa float_right" style="margin-top: -6px; margin-bottom: -7px;" onclick="javascript: document.search_form.submit();">&nbsp;</a>
			</div-->
			<!--<div style="padding-left:10px;float:left;"><input type="submit" name="search" value="{$lang.button.go}"></div>-->
		<!--/form-->
                <form name="search_form" action="giftshop.php" method="post" id="s_form">
                    <div class="float_left">
                        <div>{$lang.button.search}:</div>
                        <div class="search_input" style=" width: 370px; display:table; background-color: #FFFFFF;">
                            <input type="hidden" name="sel" value="search_gifts" />
                            <div>
                                <input class="float_left" type="text" style="border: 0 none; background-color: #FFFFFF;" name="search_name" maxlength="200" />
                            </div>
                            <a style="margin-top: -6px;margin-bottom:-7px;" onclick="javascript: document.search_form.submit();" class="big-search-lupa float_right">&nbsp;</a>			
                        </div>
                    </div>
                </form> 
	</div>
	<div>
		<p>
			<font class="text">{$lang.giftshop.basket_count_all}:</font>&nbsp;
			<font class="text_head">{$basket_info.coll}</font>
		</p>
		<p>
			<font class="text">{$lang.giftshop.basket_total}:</font>&nbsp;
			<font class="text_head">{$basket_info.summ}</font>
		</p>
	</div>	
	<div class="content content_adult_2">
		<h3 class="p-b5">{$lang.giftshop.section_categories}</h3>
			{section name=s loop=$category}
				<div style="display:table;width:100%;margin:10px 0;">
					{if $category[s].thumb_icon_path}
						<div style="width:{$settings.thumb_max_width+10}px;height:{$settings.thumb_max_height+4}px;" class="float_left">
							<a class="imgcanvas_container" href="{$form.subcat_link}&id_category={$category[s].id}">
								<img src="{$category[s].thumb_icon_path}" class="icon imgcanvas" alt="" align="top"></a>
						</div>
					{/if}
					<div class="text float_left" style="padding-{$default_left}:0px; {if $category[s].thumb_icon_path} width:607px; {/if}">
						<p>
							<a href="{$form.subcat_link}&id_category={$category[s].id}">{$category[s].name}</a>
						</p>
						<p>{$category[s].comment_all}</p>
					</div>
				</div>
			{/section}
	</div>
	{*{if $banner.right}<div class="float_left" style="padding-left:10px;">{$banner.right}</div>{/if}*}
{/if}
{/strip}
<!--/main catalog-->

{elseif  $form.page eq '2'}
{if $form.par eq 'items'}
<!--items-->
	{strip}
	<!--<p>
		<img src="{$site_root}{$template_root}{$template_images_root}/btn_back.gif" hspace="0" vspace="0" border="0" alt="">
		<a href="giftshop.php?sel=subcat&id_category={$id_category}">{$lang.giftshop.back_to_subcatalog}</a>
	</p>-->
		<!-- items list -->
		<div id="index_quick_search" class="index_quick_search search_form_hide_show" style="margin: 0 0 10px 0; padding:10px;">
			<!--form class="search_form_hide_show" name="search_form" action="giftshop.php" method="post" style="padding:10px; margin-top: 0;">
				<input type="hidden" name="sel" value="search_gifts">
				<input type="hidden" name="par" value="{$category_active.id}">
				<p>
					{$lang.button.search}:
				</p>
				<div class="keywords-box" style="height:21px; width:369px;">
					<input type="text" name="search_name" size="30" style="width:335px;border: 0 none;  background-color: #FFFFFF;">
					<a class="big-search-lupa float_right" style="margin-top: -6px;margin-bottom: -7px;" onclick="javascript: document.search_form.submit();">&nbsp;</a>
				</div>
			</form-->
                        <form name="search_form" action="giftshop.php" method="post" id="s_form">
                            <div class="float_left">
                                <div>{$lang.button.search}:</div>
                                <div class="search_input" style=" width: 370px; display:table; background-color: #FFFFFF;">
                                    <input type="hidden" name="sel" value="search_gifts">
                                    <input type="hidden" name="par" value="{$category_active.id}">
                                    <div>
                                        <input class="float_left" type="text" style="border: 0 none; background-color: #FFFFFF;" name="search_name" maxlength="200" />
                                    </div>
                                    <a style="margin-top: -6px;margin-bottom:-7px;" onclick="javascript: document.search_form.submit();" class="big-search-lupa float_right">&nbsp;</a>			
                                </div>
                            </div>
                        </form>
		</div>	
		<div>&nbsp;</div>
		<div>
			<p>
				<font class="text">{$lang.giftshop.basket_count_all}:</font>&nbsp;
				<font class="text_head">{$basket_info.coll}</font>
			</p>
			<p>
				<font class="text">{$lang.giftshop.basket_total}:</font>&nbsp;
				<font class="text_head">{$basket_info.summ}</font>
			</p>
		</div>	
		{if $form.links_top}
		<div style="display:table;width:100%;">			
			<div class="float_right" style="padding: 15px 0;">
				<div class="b-page-n">
					{foreach item=item from=$form.links_top name=links}			
						{if $smarty.foreach.links.first}
							{$lang.general.showing}&nbsp;{$current_page}&nbsp;{$lang.general.of}&nbsp;{$num_page}&nbsp;
						{/if}
						{if $item.previous_page eq 1}
							<a href="{$item.link}" class="back-page-act" id="back-page-act_top" alt="{$lang.general.back}" title="{$lang.general.back}">&nbsp;</a>
						{elseif $item.previous_page eq 2}
							<a href="javascript: void(0);" class="back">&nbsp;</a>
						{/if}
						{if $item.next_page eq 1}
							<a href="{$item.link}" class="next-page-act" id="next-page-act_top" alt="{$lang.general.next}" title="{$lang.general.next}">&nbsp;</a>
						{elseif $item.next_page eq 2}
							<a href="javascript: void(0);" class="next">&nbsp;</a>
						{/if}
					{/foreach}
				</div>
			</div>
		</div>
		{/if}
		<div class="content">
			<h3 class="p-b5">{$subcategory_name}</h3>
			{foreach key=key item=item from=$items_list name=te}
			<div style="display:table;width:100%;margin:10px 0;">
				{if $item.thumb_icon_path}
					<div class="float_left" style="width:{$settings.thumb_max_width+10}px;height:{$settings.thumb_max_height+10}px;">
						<a class="imgcanvas_container" href="{$form.view_link}&item={$item.id}&id_subcat={$item.id_subcat}&id_category={$item.id_category}"><img src="{$item.thumb_icon_path}" class="icon imgcanvas" alt=""></a>
					</div>
				{/if}
				<div class="text {if $item.thumb_icon_path}float_left{/if}" style="padding-{$default_left}:0px; {if $item.thumb_icon_path} width:522px;{else}width:{/if}">
					<p>
						<a href="{$form.view_link}&item={$item.id}&id_subcat={$item.id_subcat}&id_category={$item.id_category}">
							{$item.name}
						</a>
					</p>
					<p>{$item.comment}</p>
					<p>
						<input type="button" class="button" onclick="javascript:location.href='{$form.basket_add_link}&item={$item.id}&id_category={$category_active.id}';" value="{$header.item_add_to_basket}"><br>
					</p>
				</div>
				<div class="float_left" style="width:85px;">
					<p>{$item.price}&nbsp;{$form.curency}</p>
				</div>
			</div>
			{/foreach}
		</div>
		{if $form.links_bottom}
		<div class="search_link">
			<div class="sorting-long">
			<div class="b-page-n">	
				{foreach item=item from=$form.links_bottom  name=links}
					{if $item.first_page eq 1}
						<a href="{$item.link}" class="first-page-act">&nbsp;</a>
					{elseif $item.first_page eq 2}
						<a href="javascript: void(0);" class="first-page">&nbsp;</a>
					{/if}
					
					{if $item.previous_page eq 1}
						<a href="{$item.link}" class="back-page-act" id="back-page-act_bottom" alt="{$lang.default_select.back}" title="{$lang.default_select.back}">&nbsp;</a>
					{elseif $item.previous_page eq 2}
						<a href="javascript: void(0);" class="back">&nbsp;</a>
					{/if}
					
					{if $item.selected}
						<a href="javascript: void(0);" class="act-page">{$item.name}</a>
					{else}
						<a href="{$item.link}">{$item.name}</a>
					{/if}
					
					{if $item.delimiter}
						{$item.delimiter}
					{/if}
					
					{if $item.next_page eq 1}
						<a href="{$item.link}" class="next-page-act" id="next-page-act_bottom" alt="{$lang.default_select.next}" title="{$lang.default_select.next}">&nbsp;</a>
					{elseif $item.next_page eq 2}
						<a href="javascript: void(0);" class="next">&nbsp;</a>
					{/if}
						
					{if $item.last_page eq 1}
						<a href="{$item.link}" class="last-page-act">&nbsp;</a>
					{elseif $item.last_page eq 2}
						<a href="javascript: void(0);" class="last-page">&nbsp;</a>
					{/if}	
				{/foreach}
			</div>
			</div>
		</div> 
		{/if}
		<!-- /items list -->
		
		{if $last_viewed || $bestsellers || $same_items || $items_list || $banner.right}
		<!-- info list -->
			{if $bestsellers}
				<div style="padding:20px 30px 5px 0px;" class="float_left">
					<p>{$header.item_bestseller}:</p>
					{foreach item=item from=$bestsellers}
						<p>
							<a href="{$form.view_link}&item={$item.id}&id_category={$category_active.id}">{$item.name}</a>
						</p>
					{/foreach}
				</div>
			{/if}			
			{if $last_viewed}
				<div style="padding:20px 30px 5px 0px;" class="float_left">
					<p>{$header.item_recent}:</p>
					{foreach item=item from=$last_viewed}
						<p>
							<a href="{$form.view_link}&item={$item.id}&id_category={$category_active.id}">{$item.name}</a>
						</p>
					{/foreach}
				</div>
			{/if}
			{*{if $banner.right}<div style="float: left; padding-left:10px;">{$banner.right}</div>{/if}*}
		<!-- /info list -->
		{/if}
	  {/strip}
	<!--/items-->
{elseif $form.par eq 'detailed'}
	<!--<p>
		<img src="{$site_root}{$template_root}{$template_images_root}/btn_back.gif" hspace="0" vspace="0" border="0" alt="">
		<a href="giftshop.php?sel=subcat&id_category={$id_category}">{$lang.giftshop.back_to_subcatalog}</a>
	</p>-->
		<!-- items list -->
	{strip}
	<div class="content" >			
		<h3 class="p-b5">{$item_active.name}</h3>
		{if $form.links_top}
		<div style="display:table;width:100%;">			
			<div class="float_right" style="padding: 15px 0;">
				<div class="b-page-n">
					{foreach item=item from=$form.links_top name=links}			
						{if $smarty.foreach.links.first}
							{$lang.general.showing}&nbsp;{$current_page}&nbsp;{$lang.general.of}&nbsp;{$num_page}&nbsp;
						{/if}
						{if $item.previous_page eq 1}
							<a href="{$item.link}" class="back-page-act" id="back-page-act_top" alt="{$lang.general.back}" title="{$lang.general.back}">&nbsp;</a>
						{elseif $item.previous_page eq 2}
							<a href="javascript: void(0);" class="back">&nbsp;</a>
						{/if}
						{if $item.next_page eq 1}
							<a href="{$item.link}" class="next-page-act" id="next-page-act_top" alt="{$lang.general.next}" title="{$lang.general.next}">&nbsp;</a>
						{elseif $item.next_page eq 2}
							<a href="javascript: void(0);" class="next">&nbsp;</a>
						{/if}
					{/foreach}
				</div>
			</div>
		</div>
		{/if}
		<div style="width:100%;overflow:hidden;">
			{if $item_active.thumb_icon_path}
				<div class="float_left" style="width:{$settings.thumb_max_width+10}px;height:{$settings.thumb_max_height+10}px;">
					<span class="imgcanvas_container"><img src="{$item_active.thumb_icon_path}" class="icon imgcanvas" alt=""></span>
				</div>
			{/if}
			<div class="text float_left" style="padding-{$default_left}:0px;padding-{$default_right}:10px; {if $item_active.thumb_icon_path}width:512px;{else}width:612px;{/if}">		
				<p>{$item_active.comment}</p>
				<p>
					<input type="button" class="button" onclick="javascript:location.href='{$form.basket_add_link}&item={$item_active.id}&category={$category_active.id}';" value="{$header.item_add_to_basket}">
				</p>
			</div>
			<div class="float_left" style="width:85px;">
				<p>{$item_active.price}&nbsp;{$form.curency}</p>
			</div>
		</div>
		{if $item_active.gallery}
			<div style="margin: 0px 0px; padding-top:20px; padding-{$default_right}:10px; padding-bottom:10px; padding-{$default_left}:10px;">
				{foreach item=photo from=$item_active.gallery}
					<span class="imgcanvas_container" style="margin-{$default_right}: 5px;"><img src="{$photo.thumb_image_path}" class="icon imgcanvas" alt="" style="cursor: pointer;" onclick="launchWindow('{$form.gallery_link}','id={$item_active.id}&id_image={$photo.id}',800,560); return false;"></span>&nbsp;
				{/foreach}
			</div>
		{/if}
	</div>	  
	{if $form.links_bottom}
	<div class="search_link">
		<div class="sorting-long">
		<div class="b-page-n">	
			{foreach item=item from=$form.links_bottom}
				{if $item.first_page eq 1}
					<a href="{$item.link}" class="first-page-act">&nbsp;</a>
				{elseif $item.first_page eq 2}
					<a href="javascript: void(0);" class="first-page">&nbsp;</a>
				{/if}
				
				{if $item.previous_page eq 1}
					<a href="{$item.link}" class="back-page-act" id="back-page-act_bottom" alt="{$lang.default_select.back}" title="{$lang.default_select.back}">&nbsp;</a>
				{elseif $item.previous_page eq 2}
					<a href="javascript: void(0);" class="back">&nbsp;</a>
				{/if}
				
				{if $item.selected}
					<a href="javascript: void(0);" class="act-page">{$item.name}</a>
				{else}
					<a href="{$item.link}">{$item.name}</a>
				{/if}
				
				{if $item.delimiter}
					{$item.delimiter}
				{/if}
				
				{if $item.next_page eq 1}
					<a href="{$item.link}" class="next-page-act" id="next-page-act_bottom" alt="{$lang.default_select.next}" title="{$lang.default_select.next}">&nbsp;</a>
				{elseif $item.next_page eq 2}
					<a href="javascript: void(0);" class="next">&nbsp;</a>
				{/if}
					
				{if $item.last_page eq 1}
					<a href="{$item.link}" class="last-page-act">&nbsp;</a>
				{elseif $item.last_page eq 2}
					<a href="javascript: void(0);" class="last-page">&nbsp;</a>
				{/if}	
			{/foreach}
		</div>
		</div>
	</div>
	{/if}
	{/strip}
	<!-- /items list -->
	{if $last_viewed || $bestsellers || $same_items || $items_list || $banner.right}
	<div style="display:table;width:100%;">
		<!-- info list -->
		{strip}
		{if $items_list}
			<div class="float_left" style="padding:20px 30px 5px 0px;">
				<p>{$header.item_other}:</p>
				{foreach item=item from=$items_list}
					{if $item_active.id ne $item.id}
						<p><a href="{$form.view_link}&item={$item.id}&id_category={$category_active.id}">{$item.name}</a></p>
					{/if}
				{/foreach}
			</div>
		{/if}
		{if $bestsellers}
			<div class="float_left" style="padding:20px 30px 5px 0px;">
				<p>{$header.item_bestseller}:</p>
				{foreach item=item from=$bestsellers}
					{if $item_active.id ne $item.id}
						<p><a href="{$form.view_link}&item={$item.id}&id_category={$category_active.id}">{$item.name}</a></p>
					{/if}
				{/foreach}
			</div>
		{/if}
		{if $last_viewed}
			<div class="float_left" style="padding:20px 30px 5px 0px;">
				<p>{$header.item_recent}:</p>
				{foreach item=item from=$last_viewed}
					{if $item_active.id ne $item.id}
						<p><a href="{$form.view_link}&item={$item.id}&id_category={$category_active.id}">{$item.name}</a></p>
					{/if}
				{/foreach}
			</div>
		{/if}
		{if $same_items}
			<div class="float_left" style="padding:20px 30px 5px 0px;">
				<p>{$header.item_with_buy}:</p>
				{foreach item=item from=$same_items}
					{if $item_active.id ne $item.id}
						<p>
							<a href="{$form.view_link}&item={$item.id}&id_category={$category_active.id}">{$item.name}</a>
						</p>
					{/if}
				{/foreach}
			</div>
		{/if}
		
		{*{if $banner.right}<div style="float: left; padding-left:10px;">{$banner.right}</div>{/if}*}
		{/strip}
		<!-- /info list -->
	</div>
	{/if}
{elseif $form.par eq 'search'}
	<!-- search list -->
	<!--<p><a href="giftshop.php?sel=items&category={$category_active.id}">{$lang.button.back}</a></p>-->
	{if $form.links_top}
	<div style="display:table;width:100%;">			
		<div class="float_right" style="padding: 15px 0;">
			<div class="b-page-n">
				{foreach item=item from=$form.links_top name=links}			
					{if $smarty.foreach.links.first}
						{$lang.general.showing}&nbsp;{$current_page}&nbsp;{$lang.general.of}&nbsp;{$num_page}&nbsp;
					{/if}
					{if $item.previous_page eq 1}
						<a href="{$item.link}" class="back-page-act" id="back-page-act_top" alt="{$lang.general.back}" title="{$lang.general.back}">&nbsp;</a>
					{elseif $item.previous_page eq 2}
						<a href="javascript: void(0);" class="back">&nbsp;</a>
					{/if}
					{if $item.next_page eq 1}
						<a href="{$item.link}" class="next-page-act" id="next-page-act_top" alt="{$lang.general.next}" title="{$lang.general.next}">&nbsp;</a>
					{elseif $item.next_page eq 2}
						<a href="javascript: void(0);" class="next">&nbsp;</a>
					{/if}
				{/foreach}
			</div>
		</div>
	</div>
	{/if}
	<div class="content" style="display:table;width:100%;">
		<p>{$category_name}</p>
		{foreach key=key item=item from=$items_list name=te}
		<div style="display:table;width:100%;margin:10px 0;">
			{if $item.thumb_icon_path}
				<div class="float_left" style="width:{$settings.thumb_max_width+10}px;height:{$settings.thumb_max_height+10}px;">
					<a class="imgcanvas_container" href="{$form.view_link}&item={$item.id}&id_category={$category_active.id}">
						<img src="{$item.thumb_icon_path}" class="icon imgcanvas" alt="">
					</a>
				</div>
			{/if}
			<div class="text {if $item.thumb_icon_path}float_left{/if}" style="padding-{$default_left}:0px; {if $item.thumb_icon_path} width:522px;{else}width:{/if}">
				<p>
					<a href="{$form.view_link}&item={$item.id}&id_category={$category_active.id}">{$item.name}</a>
				</p>
				<p>{$item.comment}</p>
				<p>{$lang.giftshop.category}:<a href="{$form.subcat_link}&id_category={$item.id_category}">{$item.category}</a></p>
				<p>
					<input type="button" class="button" onclick="javascript:location.href='{$form.basket_add_link}&item={$item.id}&category={$category_active.id}';" value="{$header.item_add_to_basket}">
				</p>
			</div>
			<div class="float_left" style="width:85px;">
				<p>{$item.price}&nbsp;{$form.curency}</p>
			</div>
		</div>
		{/foreach}
	</div>
	{if $form.links_bottom}
	<div class="search_link">
		<div class="sorting-long">
		<div class="b-page-n">	
			{foreach item=item from=$form.links_bottom}
				{if $item.first_page eq 1}
					<a href="{$item.link}" class="first-page-act">&nbsp;</a>
				{elseif $item.first_page eq 2}
					<a href="javascript: void(0);" class="first-page">&nbsp;</a>
				{/if}
				
				{if $item.previous_page eq 1}
					<a href="{$item.link}" class="back-page-act" id="back-page-act_bottom" alt="{$lang.default_select.back}" title="{$lang.default_select.back}">&nbsp;</a>
				{elseif $item.previous_page eq 2}
					<a href="javascript: void(0);" class="back">&nbsp;</a>
				{/if}
				
				{if $item.selected}
					<a href="javascript: void(0);" class="act-page">{$item.name}</a>
				{else}
					<a href="{$item.link}">{$item.name}</a>
				{/if}
				
				{if $item.delimiter}
					{$item.delimiter}
				{/if}
				
				{if $item.next_page eq 1}
					<a href="{$item.link}" class="next-page-act" id="next-page-act_bottom" alt="{$lang.default_select.next}" title="{$lang.default_select.next}">&nbsp;</a>
				{elseif $item.next_page eq 2}
					<a href="javascript: void(0);" class="next">&nbsp;</a>
				{/if}
					
				{if $item.last_page eq 1}
					<a href="{$item.link}" class="last-page-act">&nbsp;</a>
				{elseif $item.last_page eq 2}
					<a href="javascript: void(0);" class="last-page">&nbsp;</a>
				{/if}	
			{/foreach}
		</div>
		</div>
	</div>	
	{/if}	
	<!-- /search list -->
  {/if}
  
{elseif  $form.page eq '3'}
	<div class="content" style="padding-top:10px; padding-bottom:15px;">
	<!-- header -->
	<!-- selected category -->
	{if $basket_data.positions}
		<form name=basket_form method=post action="{$basket_data.form_action}" style="margin:0px">
			{$basket_data.form_hidden}
			<div style="width:100%;padding:0px;" class="contant">
				<dl>
					<dt class="text_head table_header" style="width:260px; padding-{$default_left}: 10px;"">
						{$header.basket_gift}
					</dt>
					<dt class="text_head table_header" style="width:120px;">
						{$header.basket_quantity}
					</dt>
					<dt class="text_head table_header" style="width:115px;">
						{$header.basket_price}
					</dt>
					<dt class="text_head table_header" style="width:115px;">
						{$header.basket_summ}
					</dt>
					<dt class="text_head table_header" style="width:105px; text-align:center;">
						{$header.remove_gift}
					</dt>
				</dl>
				{foreach key=key item=item from=$basket_data.positions}
					<dl class="dl_line" style="height:33px;">
						<dd style="width:266px; padding-{$default_left}: 10px;">
							<a href="./{$form.file_name}?sel=view&item={$item.shop.id}&id_category={$item.shop.id_category}">{$item.shop.name}</a>
						</dd>
						<dd class="text" style="width:116px; padding-{$default_right}: 10px;">
							<input name="quantity[{$item.shop.id}]" value="{$item.quantity}" style="width: 50px">
						</dd>
						<dd class="text" style="width:112px; padding-{$default_right}: 10px;">
							{$item.shop.price} {$form.curency}
						</dd>
						<dd class="text" style="width:130px; padding-{$default_right}: 10px;">
							{$item.summ} {$form.curency}
						</dd>
						<dd class="text" style="width:70px; padding-{$default_right}: 10px; text-align:center;">
							<a href="./{$form.file_name}?sel=del&item={$item.shop.id}" title="{$header.alt_remove_gift}" class="delete-icon">
								&nbsp;
							</a>
						</dd>
					</dl>
				{/foreach}
				<dl class="search_form_hide_show" style="height:33px;margin-top:-7px;padding-top:10px;">
					<dd style="padding-{$default_left}: 10px;">{$header.basket_total}: <b>{$basket_data.all_summ.summ} {$form.curency}</b></dd>
				</dl>
			</div>
			<div>
				<div class="float_left" style="height:35px;width:100%;margin-top:10px;">
					<input type="button" class="button" onclick="javascript: document.basket_form.submit();" value="{$header.basket_refresh}">
					<input type="button" class="button" onclick="launchWindow('{$form.file_name}','sel=users_form',590,670); return false;" value="{$header.basket_select_user}">
					{if $user_info}
						<!--input type="button" class="button" onclick="Delivery();" value="Delivery"-->
						<input type="button" class="button" onclick="javascript: document.basket_form.sel.value='confirm_order'; document.basket_form.submit();" value="{$lang.button.confirm_and_order}">
					{/if}
				</div>
			</div>
			{if $user_info}
			<!--div id="delivery" style="display:none;"></div-->
			<div>&nbsp;</div>
			<div style="width:100%;display:table;">
				<p>{$header.basket_for}:</p>
				<div class="float_left" style="width:120px;"><span class="imgcanvas_container"><img src="{$user_info.icon_path}" class="icon imgcanvas" alt=""></span></div>
				<div class="float_left" style="width:589px;">
					<p>{$user_info.login}{if $user_info_couple.login}&nbsp;+&nbsp;{$user_info_couple.login}{/if}</p>
					<p>{if $user_info.city}{$user_info.city}, {/if}{if $user_info.region}{$user_info.region}, {/if}{$user_info.country}{if $user_info_couple.country || $user_info_couple.region || $user_info_couple.city}&nbsp;+&nbsp;{if $user_info_couple.city}{$user_info_couple.city}, {/if}{if $user_info_couple.region}{$user_info_couple.region}, {/if}{if $user_info_couple.country}{$user_info_couple.country}{/if}{/if}</p>
					<p class="text_hidden">{$user_info.age}{if $user_info_couple.age}&nbsp;+&nbsp;{$user_info_couple.age}{/if} {$lang.home_page.ans}</p>
					<p>{$header.basket_info}:</p>
				</div>				
				<textarea name="comment" id="comment" onkeyup="BadWords('comment');" style="width:580px; height: 100px; margin: 5px;" ></textarea>
                <div id="bad_div_comment" class="bad_div"></div>
			</div>
			{/if}
		</form>
		{else}
			<div style="height:20px">&nbsp;</div>
			<center>{$header.basket_empty}</center>
			<div style="height:20px">&nbsp;</div>
		{/if}
		{*********NIKITA START***********}
				{if $order_for || $order_from}
				
				<div class="section">
				<div>&nbsp;</div>
				<div class="main_tabs">
				  <ul class="tabs">
					<li class="tab_block first active"><a href="" onClick="javascript: CurrentOrder(); return false;">{$header.current_order}({$order_cur})</a></li>
					<li class="tab_block"><a href="" onClick="javascript: Ordersview(); return false;">{$header.from_me}({$order_from})</a></li>
					<li class="tab_block"><a href="" onClick="javascript: MyOrdersview(); return false;">{$header.for_me}({$order_for_new}/{$order_for})</a></li>
				  </ul>
				 </div>
				  <div id="box_header" class="contant" style="display: none;">
					<dl style="overflow:hidden;padding:5px 0;">
					<dt class="text_head table_header" style="width: 265px;">
						{$header.order_number}
						<div style="height: 1px; margin: 5px 0px" class="delimiter"></div>
					</dt>
					<dt class="text_head table_header" style="width: 115px;">
						{$header.basket_quantity}
						<div style="height: 1px; margin: 5px 0px" class="delimiter"></div>
					</dt>
					<dt class="text_head table_header" style="width: 115px;">
						{$header.basket_price}
						<div style="height: 1px; margin: 5px 0px" class="delimiter"></div>
					</dt>
					<dt class="text_head table_header" style="width: 115px;">
						{$header.basket_summ}
						<div style="height: 1px; margin: 5px 0px" class="delimiter"></div>
					</dt>
					<dt class="text_head table_header" style="width:94px;">
						{$header.order_status}
						<div style="height: 1px; margin: 5px 0px" class="delimiter"></div>
					</dt>
				</dl>
				  </div>
				  <div id="box_1" class="box" style="display: block;"></div>
				  <div id="box_2" class="box" style="display: none;"></div>
				  <div id="box_3" class="box" style="display: none;"></div>
				</div>
				
				{literal}
				<script>
				(function($) {
					$(function() {

					  $('ul.tabs').delegate('li:not(.active)', 'click', function() {
						$(this).addClass('active').siblings().removeClass('active')
						  .parents('div.section').find('div.box').hide().eq($(this).index()).fadeIn(500);
					  })

					})
					})(jQuery)
					
					$(document).ready(function(){
						CurrentOrder();return false;
					});
				</script>
				{/literal}
				{/if}
				{if $bestsellers}
					<div class="ecards">
						<h3 class="p-b5">{$lang.cards.most_popular}</h3>
						<div>
							{foreach item=item from=$bestsellers name=s}
								<div class="popular_images" {if $smarty.foreach.s.last}style="width: 110px;"{/if}>
									<div style="margin-right:3px;">
										<a class="imgcanvas_container" href="{$site_root}/{$seo.giftshop}?sel=view&item={$item.id}&id_subcat={$item.id_subcat}&id_category={$item.id_category}">
											<img class="imgcanvas" src="{$item.thumb_icon_path}" width="60" height="75" border="0">
										</a>
									</div>
									<div class="popular_img_text"><a href="{$site_root}/{$seo.giftshop}?sel=view&item={$item.id}&id_subcat={$item.id_subcat}&id_category={$item.id_category}">{$item.name}</a></div>
								</div>
							{/foreach}
						</div>
					</div>
					<div style="padding-top:20px; padding-bottom:20px; border-bottom: 1px solid #CCCCCC;"></div>
				{/if}
				{*********NIKITA STOP***********}
	</div>
  <!-- /selected category -->
  
{elseif  $form.page eq '4'}
{if $form.par eq 'confirm_order'}
	<div class="content">
		{if $basket_data.positions}
			<div style="width:100%;">
				<dl>
					<dt class="text_head table_header" style="348px">
						{$header.basket_gift}
						<div style="height: 1px; margin: 5px 0px" class="delimiter"></div>
					</dt>
						<dt class="text_head table_header" style="width: 115px;">
						{$header.basket_quantity}
						<div style="height: 1px; margin: 5px 0px" class="delimiter"></div>
					</dt>
					<dt class="text_head table_header" style="width: 115px;">
						{$header.basket_price}
						<div style="height: 1px; margin: 5px 0px" class="delimiter"></div>
					</dt>
					<dt class="text_head table_header" style="width: 115px;">
						{$header.basket_summ}
						<div style="height: 1px; margin: 5px 0px" class="delimiter"></div>
					</dt>
				</dl>
				{foreach key=key item=item from=$basket_data.positions}
					<dl>
						<dt style="355px" >
							<a href="./{$form.file_name}?sel=view&item={$item.shop.id}&id_category={$item.shop.id_category}">{$item.shop.name}</a>
						</dt>
						<dt class="text" style="width: 120px;">{$item.quantity}</dt>
						<dt class="text" style="width: 120px;">{$item.shop.price} {$form.curency}</dt>
						<dt class="text" style="width: 120px;">{$item.summ} {$form.curency}</dt>
					</dl>
				{/foreach}
				<p class="text">{$header.basket_total}: {$basket_data.all_summ} {$form.curency}</p>
			</div>
			{if $user_info}
				<div style="width:100%;">
				<dt style="width:100%" class="text" valign="top">{$header.basket_for}:</dt>
					<dt style="width:80px" class="text" align=center><span class="imgcanvas_container"><img src="{$user_info.icon_path}" class="icon imgcanvas" alt=""></span></dt>
					<dt style="width:100%" class="text" valign="top">
						<div style="margin-top: 7px">
							<font class="text_head"><b>{$user_info.login}</b></font>&nbsp;
						</div>
						<div style="margin-top: 2px">
							<font class="text">{if $user_info.city}{$user_info.city}, {/if}{if $user_info.region}{$user_info.region}, {/if}{$user_info.country}</font>
						</div>
						<div style="margin-top: 2px">
							<font class="text_hidden">{$user_info.age} {$lang.home_page.ans}</font>&nbsp;
						</div>
					<div style="margin-top: 2px">
				{if $user_info.comment}
					<font class=text_head><br>&nbsp;&nbsp;{$header.basket_info}:</font>
					<div class=text style="margin:5px">{$user_info.comment}</div>
				{/if}
			</div>
				</dt>
			</div>
			{/if}
			{if $basket_data.status ne '1'}
				<div style="margin: 200px 0px" class="text_hidden" align=center>
					<input type="button" class="button" onclick="javascript:location.href='{$form.payment_link}{$basket_data.order_id}'" value="{$header.basket_pay}">&nbsp;
					<input type="button" class="button" onclick="javascript:location.href='{$form.del_order}'" value="{$header.del_order}">
					{if $basket_data.status eq '0'}<div style="margin-top: 2px">{$header.basket_not_paid}</div>{/if}
				</div>
			{else}
				<div style="height:20px">&nbsp;</div>
			{/if}
		{else}
			<div style="height:20px">&nbsp;</div>
			<center>{$header.order_empty}</center>
			<div style="height:20px">&nbsp;</div>
		{/if}
	</div>
{elseif $form.par eq 'payment'}
	<div class="content">
		<form name="add_pay" action="{$form.action}" method="post">
			{$form.hiddens}
			<div>
				<dt>{$header.order_amount}: &nbsp;&nbsp;&nbsp;</dt>
				<dd><b>{$basket_data.all_summ}</b>&nbsp;{$basket_data.account_currency}</dd>
				{if $data.count >= $basket_data.all_summ}
					<dl valign=top>
						<dt class="text">{$lang.pays.account_status}: &nbsp;&nbsp;&nbsp;</dt>
						<dd class="text">
							<span class="float_left"><b>{$data.count}</b>&nbsp;</span>
							<span class="float_left">{$basket_data.account_currency}</span>
							<span class="float_left">&nbsp;&nbsp;&nbsp;</span>
							{if $data.order_id}
							<a class="float_left" href="giftshop.php?sel=pay_from_account&order_id={$data.order_id}">{$lang.button.from_current_account}</a>
							{else}
							<a class="float_left" href="giftshop.php?sel=pay_from_account&order_id={$order_id}">{$lang.button.from_current_account}</a>
							{/if}
						</dd>
					</dl>
				{/if}
			</div>
		</form>
		<div style="margin: 10px 0px">
		  {foreach name=s item=item from=$paysys}
			<input style="margin-top:10px;" type="button" class="button" onclick="javascript:document.add_pay.paysys.value='{$item.template_name}';document.add_pay.submit();" value="{$item.name}">&nbsp;
		  {/foreach}
		</div>
	  </div>
	</div>
{elseif $form.par eq 'history'}
	<div class="content">
		{if $order_data.positions}
			<div style="width:100%;">
				<dl style="overflow:hidden;padding:5px 0;">
					<dt class="text_head table_header" style="width: 265px;">
						{$header.order_number}
						<div style="height: 1px; margin: 5px 0px" class="delimiter"></div>
					</dt>
					<dt class="text_head table_header" style="width: 115px;">
						{$header.basket_quantity}
						<div style="height: 1px; margin: 5px 0px" class="delimiter"></div>
					</dt>
					<dt class="text_head table_header" style="width: 115px;">
						{$header.basket_price}
						<div style="height: 1px; margin: 5px 0px" class="delimiter"></div>
					</dt>
					<dt class="text_head table_header" style="width: 115px;">
						{$header.basket_summ}
						<div style="height: 1px; margin: 5px 0px" class="delimiter"></div>
					</dt>
					<dt align=center class="text_head table_header" style="width:84px;">
						{$header.order_status}
						<div style="height: 1px; margin: 5px 0px" class="delimiter"></div>
					</dt>
				</dl>
				{foreach key=key item=item from=$order_data.positions}
					<dl style="overflow:hidden;padding:5px 0;">
						<dt style="width: 287px;">
							<a href="./{$form.file_name}?sel=view_order&order={$item.order_info.id}">
								{$header.order_number}&nbsp;&#8470;&nbsp;{$item.order_info.id}
							</a> 
							<font class="text_hidden">({$item.order_info.date_order})</font>
						</dt>
						<dt style="width: 103px;">
							<font class=text>{$item.coll}</font>
						</dt>
						<dt style="width: 112px;">&nbsp;</dt>
						<dt style="width: 141px;">
							<font class=text>{$item.all_sum} {$form.curency}</font>
						</dt>
						<dt style="width: 70px;">
							<font class=text>
							{******NIKITA START*********}
							{if $item.order_info.paid_status}
							{$lang.giftshop.paid_status.yes}
							{else}
							<a href="./{$form.file_name}?sel=view_order&order={$item.order_info.id}">{$lang.giftshop.paid_status.no}</a>
							{/if}
							{******NIKITA STOP*********}
							</font>
						</dt>
					</dl>
					{foreach item=item_pos from=$item.order_info.items}
						<dl style="overflow:hidden;padding:5px 0;">
							<dt style="width: 287px;">
								<div style="margin-{$default_left}: 10px" class=text>{$item_pos.shop.name}</div>
							</dt>
							<dt style="width: 103px;">
								<font class=text>{$item_pos.quantity}</font>
							</dt>
							<dt style="width: 112px;">
								<font class=text>{$item_pos.currency} {$form.curency}</font>
							</dt>
							<dt style="width: 141px;">
								<font class=text>{$item_pos.summ} {$form.curency}</font>
							</dt>
							<dt>&nbsp;</dt>
						</dl>
					{/foreach}
					<dl>&nbsp;</dl>
				{/foreach}
			</div>
		{else}
			<div style="height:20px">&nbsp;</div>
			<center>{$header.order_list_empty}</center>
			<div style="height:20px">&nbsp;</div>
		{/if}
	  </div>
	</div>
{/if}
{elseif $form.par eq 'history_my'}

<div class="content">
		{if $order_data.positions}
				
			<div style="width:100%;">
				<dl style="overflow:hidden;padding:5px 0;">
					<dt class="text_head table_header" style="width: 265px;">
						{$header.order_number}
						<div style="height: 1px; margin: 5px 0px" class="delimiter"></div>
					</dt>
					<dt class="text_head table_header" style="width: 115px;">
						{$header.basket_quantity}
						<div style="height: 1px; margin: 5px 0px" class="delimiter"></div>
					</dt>
					<dt class="text_head table_header" style="width: 115px;">
						{$header.basket_price}
						<div style="height: 1px; margin: 5px 0px" class="delimiter"></div>
					</dt>
					<dt class="text_head table_header" style="width: 115px;">
						{$header.basket_summ}
						<div style="height: 1px; margin: 5px 0px" class="delimiter"></div>
					</dt>
				</dl>
				{foreach key=key item=item from=$order_data.positions}
					<dl style="overflow:hidden;padding:5px 0;">
						<dt style="width: 287px;">
							<a href="./{$form.file_name}?sel=view_order&order={$item.order_info.id}">
								{$header.order_number}&nbsp;&#8470;&nbsp;{$item.order_info.id}
							</a> 
							<font class="text_hidden">({$item.order_info.date_order})</font>
						</dt>
						<dt style="width: 103px;">
							<font class=text>{$item.coll}</font>
						</dt>
						<dt style="width: 112px;">&nbsp;</dt>
						<dt style="width: 141px;">
							<font class=text>{$item.all_sum} {$form.curency}</font>
						</dt>
					</dl>
					{foreach item=item_pos from=$item.order_info.items}
						<dl style="overflow:hidden;padding:5px 0;">
							<dt style="width: 287px;">
								<div style="margin-{$default_left}: 10px" class=text>{$item_pos.shop.name}</div>
							</dt>
							<dt style="width: 103px;">
								<font class=text>{$item_pos.quantity}</font>
							</dt>
							<dt style="width: 112px;">
								<font class=text>{$item_pos.currency} {$form.curency}</font>
							</dt>
							<dt style="width: 141px;">
								<font class=text>{$item_pos.summ} {$form.curency}</font>
							</dt>
							<dt>&nbsp;</dt>
						</dl>
					{/foreach}
					<dl>&nbsp;</dl>
				{/foreach}
			</div>
		{else}
			<div style="height:20px">&nbsp;</div>
			<center>{$header.order_list_empty}</center>
			<div style="height:20px">&nbsp;</div>
		{/if}
	  </div>
{elseif  $form.page eq '5'}
	  <div class="content">
		<div style="padding-top:10px; padding-{$default_right}:15px; padding-bottom:15px; padding-{$default_left}:10px;">
		{$lang.pays.amount_was_taken_text_1}&nbsp;{$form.amount}&nbsp;{$form.costunits}&nbsp;{$lang.pays.amount_was_taken_text_2}&nbsp;{$form.new_account_curr}&nbsp;{$form.costunits}&nbsp;
		&nbsp;
		<p><a href="giftshop.php">{$lang.button.back_to_shop}</a></p>
		</div>
	  </div>
	  <!-- /selected category -->
{/if}

{literal}
<script language="JavaScript" type="text/javascript">
function Delivery(){
	id_user = '{/literal}{$user_info.id}{literal}';
	$.post(SEO_SITE_ROOT+"/giftshop.php?id_user_to="+id_user,{sel:'delivery', act:''}, function(data){
		$("div #delivery").show();
		$("div #delivery").append(data);
	});
}
function CurrentOrder() {
	user_id = {/literal}{$user_id}{literal};
	$.post(
		SITE_ROOT+"/giftshop.php",
		{sel:"view_orders_ajax", user_id:user_id},
		function(data) {
			resp = getJQData(data);
			for(i = 0; i < resp.length; i++){
				if(i == 0)
					$('#box_1').html('<div id="box1'+i+'">'+resp[i]+'</div>')
				else 
					$('#box1'+(i-1)).before('<div id="box1'+i+'">'+resp[i]+'</div>')
			}
			$("div #box_header").show();
		}
	);
}
function Ordersview() {
	orders_all = 1;
	user_id = {/literal}{$user_id}{literal};
	$.post(
		SITE_ROOT+"/giftshop.php",
		{sel:"view_orders_ajax", user_id:user_id, orders_all:orders_all},
		function(data) {
			resp = getJQData(data);
			for(i = 0; i < resp.length; i++){
				if(i == 0)
					$('#box_2').html('<div id="box2'+i+'">'+resp[i]+'</div>')
				else 
					$('#box2'+(i-1)).before('<div id="box2'+i+'">'+resp[i]+'</div>')
			}
			$("div #box_header").show();
		}
	);
}
function MyOrdersview() {
	
	user_id = {/literal}{$user_id}{literal};
	$.post(
		SITE_ROOT+"/giftshop.php",
		{sel:"view_my_orders_ajax", user_id:user_id},
		function(data) {
			resp = getJQData(data);
			for(i = 0; i < resp.length; i++){
				if(i == 0)
					$('#box_3').html('<div id="box3'+i+'">'+resp[i]+'</div>')
				else 
					$('#box3'+(i-1)).before('<div id="box3'+i+'">'+resp[i]+'</div>')
			}
			$("div #box_header").show();
		}
	);
}
</script>
{/literal}