<!-- listing block -->

{if $listing.Listing_type}
	{assign var='listing_type' value=$listing_types[$listing.Listing_type]}
{/if}

<li class="{if $listing.Featured}featured{/if}" id="listing_{$listing.ID}">
	<table class="sTable">
	<tr>
		<td class="icons-bar">
			<a id="fav_{$listing.ID}" title="{$lang.add_to_favorites}" href="javascript:void(0)" class="icon add_favorite"><span>&nbsp;</span></a>
			
			{if !empty($listing.Main_photo) && $config.grid_photos_count && $listing_type.Photo}
			<span class="photos_count">
				<a {if $config.view_details_new_window}target="_blank"{/if} href="{$rlBase}{if $config.mod_rewrite}{$pages[$listing_type.Page_key]}/{$listing.Path}/{str2path string=$listing.listing_title}-{$listing.ID}.html{if $hl}?highlight{/if}{else}?page={$pages[$listing_type.Page_key]}&amp;id={$listing.ID}{if $hl}&amp;highlight{/if}{/if}">{$listing.Photos_count}</a>
			</span>
			{/if}
		</td>
		{if $listing_type.Photo}
		<td class="image" rowspan="2" valign="top">
			<div class="img">
				{if $listing.Featured}
					<div class="featured_line">
						{if $listing_type.Page}<a {if $config.view_details_new_window}target="_blank"{/if} title="{$lang.featured}" href="{$rlBase}{if $config.mod_rewrite}{$pages[$listing_type.Page_key]}/{$listing.Path}/{str2path string=$listing.listing_title}-{$listing.ID}.html{if $hl}?highlight{/if}{else}?page={$pages[$listing_type.Page_key]}&amp;id={$listing.ID}{if $hl}&amp;highlight{/if}{/if}">{$lang.featured[0]}</a>{/if}
					</div>
				{/if}
				{if $listing_type.Page}<a title="{$listing.listing_title}" {if $config.view_details_new_window}target="_blank"{/if} href="{$rlBase}{if $config.mod_rewrite}{$pages[$listing_type.Page_key]}/{$listing.Path}/{str2path string=$listing.listing_title}-{$listing.ID}.html{if $hl}?highlight{/if}{else}?page={$pages[$listing_type.Page_key]}&amp;id={$listing.ID}{if $hl}&amp;highlight{/if}{/if}">{/if}
					<img {if empty($listing.Main_photo)}class="blank" style="width: 100px;height: 70px;"{/if} alt="{$listing.listing_title}" src="{if empty($listing.Main_photo)}{$rlTplBase}img/blank.gif{else}{$smarty.const.RL_URL_HOME}files/{$listing.Main_photo}{/if}" />
				{if $listing_type.Page}</a>{/if}
			</div>
		</td>
		{/if}
		<td align="{$text_dir}" valign="top">
			<div {if $listing_type.Photo}class="fields"{/if}>
				<table>
				{assign var='f_first' value=true}
				{foreach from=$listing.fields item='item' key='field' name='fListings'}
				{if !empty($item.value) && $item.Details_page}
				<tr id="sf_field_{$listing.ID}_{$item.Key}">
					{if $config.sf_display_fields}
						<td valign="top">
							<div class="field">{$item.name}:</div>
						</td>
					{/if}
					<td valign="top">
						{if $f_first}
							<a {if $config.view_details_new_window}target="_blank"{/if} href="{$rlBase}{if $config.mod_rewrite}{$pages[$listing_type.Page_key]}/{$listing.Path}/{str2path string=$listing.listing_title}-{$listing.ID}.html{if $hl}?highlight{/if}{else}?page={$pages[$listing_type.Page_key]}&amp;id={$listing.ID}{if $hl}&amp;highlight{/if}{/if}">
								<b>{$item.value}</b>
							</a>
						{else}
							<div class="value">
								{$item.value}
							</div>
						{/if}
					</td>
				</tr>
				{assign var='f_first' value=false}
				{/if}
				{/foreach}
				</table>
			</div>
		</td>
	</tr>
	</table>
</li>

{if $smarty.foreach.listingsF.last}
	<li class="last"></li>
{/if}

<!-- listing block end -->