
<patTemplate:tmpl name="pageoutput" unusedvars="strip">
<script type="text/javascript">
function navigate(lat, lng) {
    // If it's an iPhone..
    if ((navigator.platform.indexOf("iPhone") !== -1) || (navigator.platform.indexOf("iPod") !== -1)) {
		function iOSversion() {
        if (/iP(hone|od|ad)/.test(navigator.platform)) {
          // supports iOS 2.0 and later: <http://bit.ly/TJjs1V>
          var v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);
          return [parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)];
        }
      }
      var ver = iOSversion() || [0];

      if (ver[0] >= 6) {
        protocol = 'maps://';
      } else {
        protocol = 'http://';

      }
      window.location = protocol + 'maps.apple.com/maps?daddr=' + lat + ',' + lng + '&amp;ll=';
    }
    else {
      window.open('http://maps.google.com?daddr=' + lat + ',' + lng + '&amp;ll=');
    }
  }
</script>

<style type="text/css">
.property-header-buttons {padding-top:10px;}
.property-header-fb span.fb_iframe_widget span {height:25px !important;vertical-align:top !important;}
.property-header-labels {padding:5px 0;}
.property-header-labels span.label {font-size:100%;padding:0.3em 0.6em;display:block;}
.property-header address {margin-bottom:5px;}
</style>

<div class="panel panel-default">
	<div class="panel-body">
		<div class="property-header">
			<div class="row">
				<div class="col-md-2 hidden-xs hidden-sm">
					<img alt="{PROPERTY_NAME}" src="{IMAGETHUMB}" class="img-responsive"/>
				</div>
				<div class="col-md-10">
					<h1 id="tour_target_property_header">{PROPERTY_NAME} <span>{STARS} {SUPERIOR}</span></h1>
					<patTemplate:tmpl name="permit" type="simpleCondition" requiredVars="permit_number">
						<p class="label label-info">{_JOMRES_PERMIT_NUMBER_TITLE} {PERMIT_NUMBER}</p>
					</patTemplate:tmpl>
					<div class="row">
						<div class="col-md-8">
							{STREET}, {TOWN}, {REGION} {POSTCODE}, {COUNTRY}
								<span class="hidden-xs">
									{HTELEPHONE}<span>{TELEPHONE}</span>,
									{HFAX}{FAX}
								</span>
								<span class="visible-xs">
									<br/>
									<a href="tel:{TELEPHONE}" class="btn btn-success"><i class="fa fa-phone"></i>
										{JOMRES_TAPTOCALL} {TELEPHONE}</a>
									<a href="whatsapp://send?phone={WHATSAPP_TELEPHONE}" class="btn btn-success"><i class="fa fa-whatsapp"></i></a>
								</span>

							<div><a href="{GALLERYLINK}" target="_blank">{GALLERYDOMAIN}</a></div>
							<div class="property-header-fb hidden-xs hidden-sm">
								{FACEBOOK_BUTTONS}
							</div>
						</div>
						<div class="col-md-4 hidden-xs hidden-sm">
							<div class="property-header-labels pull-right">
								<span class="label {REQUIRE_APPROVAL_CLASS}">{REQUIRE_APPROVAL}</span>
							</div>
							<div class="property-header-labels pull-right">
								<span class="label label-info">{PRE_TEXT} <span itemprop="priceRange">{PRICE}</span> {POST_TEXT}</span>
								<span class="big-price big-total-price">{PRICE_CUMULATIVE} {FOR} {STAY_DAYS} {NIGHTS_TEXT}</span>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="row hidden-xs hidden-sm">
				<div class="col-md-12">
					<div class="property-header-buttons pull-left">
						<a href="{DIRECT_URL}" class="btn btn-default"><i class="fa fa-info-circle"></i> {COMMON_VIEW}</a>
						<patTemplate:tmpl name="bookinglink" type="simpleCondition" requiredVars="link" unusedvars="nbsp">
						<a href="{LINK}" class="btn btn-success"><i class="fa fa-shopping-cart"></i> {TEXT}</a>
						</patTemplate:tmpl>
						<a href="{CONTACT_LINK}" class="btn btn-default"><i class="fa fa-envelope"></i> {HCONTACT}</a>
						<a href="javascript:void(0);" id="shortlist_{PROPERTY_UID}" onclick="shortlist('{PROPERTY_UID}', '1')" class="btn btn-default">{SHORTLIST}</a>
						<a href="{SHORTLIST_LINK}" class="btn btn-default"><i class="fa fa-heart"></i> {HSHORTLIST}</a>
						<a href="javascript:navigate({PROPERTY_LAT},{PROPERTY_LONG});" class="btn btn-default"><i class="fa fa-map-marker"></i> {HMAP}</a>
						{HOST_LINK}
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
</patTemplate:tmpl>