<?php
$URL = PJ_INSTALL_URL . $controller->getLanguage() . '/';
$filter_suffix = !isset($_GET['is_best_deal']) ? 'packages' : 'deals';
include dirname(__FILE__) . '/elements/filter.php'; ?>

<div class="row">
	<ul class="viewing-mode">
		<li><a href="#" class="viewing-mode viewing-list<?php echo @$view != 'list' ? NULL : ' viewing-active'; ?>" title="<?php __('front_label_list', false, true); ?>" data-view="list"></a></li>
		<li><a href="#" class="viewing-mode viewing-grid<?php echo @$view != 'grid' ? NULL : ' viewing-active'; ?>" title="<?php __('front_label_grid', false, true); ?>" data-view="grid"></a></li>
		<li><a href="#" class="viewing-mode viewing-map<?php echo @$view != 'map' ? NULL : ' viewing-active'; ?>" title="<?php __('front_label_map', false, true); ?>" data-view="map"></a></li>
	</ul>
</div>

<?php
if (in_array($view, $available_views))
{
	include dirname(__FILE__) . sprintf('/elements/view-%s.php', $view);
	if($view == 'map')
	{
		if(!isset($_GET['view']))
		{
			?><input type="hidden" id="map_first_time" id="map_first_time" value="1" /><?php
		}
	}
} else {
	include dirname(__FILE__) . '/elements/view-list.php';
}
?>