<!-- listing preview tpl -->

{if $tpl_settings.type == 'responsive_42'}
	<style>
	@import '{$rlTplBase}css/fancybox.css';
	</style>
{/if}

{if $cur_step == 'preview'}
	<div class="area_preview step_area">
		{include file='controllers'|cat:$smarty.const.RL_DS|cat:'listing_details.tpl'}
		
		<div style="padding: 20px 0 0 0;" class="clear">
			<form method="post" action="{$rlBase}{if $config.mod_rewrite}{$pageInfo.Path}/{$category.Path}/{$steps.$cur_step.path}.html{else}?page={$pageInfo.Path}&amp;id={$category.ID}&amp;step={$steps.$cur_step.path}{/if}">
				<input type="hidden" name="step" value="preview" />
				
				<table class="submit">
				<tr>
					<td class="name button"><a href="{$rlBase}{if $config.mod_rewrite}{$pageInfo.Path}/{$category.Path}/{$prev_step.path}.html{else}?page={$pageInfo.Path}&amp;id={$category.ID}&amp;step={$prev_step.path}{/if}" class="dark_12">{if $smarty.const.RL_LANG_DIR == 'ltr'}&larr;{else}&rarr;{/if} {$lang.edit_listing}</a></td>
					<td class="field button"><span class="arrow"><input type="submit" value="{$lang.listingPreview_confirm}" id="video_submit" /><label for="video_submit" class="right">&nbsp;</label></span></td>
				</tr>
				</table>
			</form>
		</div>
	</div>
	
	<script type="text/javascript">
	{literal}

	// flatty template optimization
	if (!$('#controller_area > aside.left,#controller_area > aside.right').length) {
		$('#controller_area').prepend($('div.area_preview > aside'));
	}

	// default handlers
	$(document).ready(function(){
		$('div#controller_area > div.highlight').hide();
		$('ul.statistics li a.button').parent().hide();

		if ( rlConfig['template_type'] == 'responsive_42' ) {
			flynaxTpl.listingDetails();

			if ( media_query == 'mobile' && $('div.gallery div.thumbs div.slider a').length > 0 ) {
				Modernizr.load({
					load: rlConfig['tpl_base']+'js/code-photoswipe.js',
					complete: function(){
						$('div.gallery div.thumbs div.slider a:not(.video)').photoSwipe();
					}
				});
			}
		}
	});

	{/literal}
	</script>
{/if}

<!-- listing preview tpl end -->