<div id="pjVpEnquirySection" class="panel panel-default pjVpProductSection">
	<header class="panel-heading pjVpProductSectionHead">
		<h3 class="panel-title pjVpProductSectionTitle"><?php __('front_label_enquiry');?></h3><!-- /.panel-title -->
	</header><!-- /.panel-heading pjVpProductSectionHead -->
					
	<div class="panel-body pjVpProductSectionBody">
		<div class="row">
			<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12">
				<form id="pjVpEnquiryForm_<?php echo $index;?>" action="?controller=pjListings&amp;action=pjActionView&amp;id=<?php echo $_GET['id']; ?>" method="post" class="form-horizontal pjVpForm pjVpFormReservation" data-toggle="validator" role="form">
					<input type="hidden" name="booking_form" value="1" />
					<input type="hidden" name="listing_id" value="<?php echo $_GET['id']; ?>" />
					<input type="hidden" name="folder" value="<?php echo PJ_INSTALL_FOLDER; ?>" />
					
					<?php
					$months = __('months', true);
					$short_months = __('short_months', true);
					ksort($months);
					ksort($short_months);
					$days = __('days', true);
					$short_days = __('short_days', true);
					
					$week_start = isset($tpl['option_arr']['o_week_start']) && in_array((int) $tpl['option_arr']['o_week_start'], range(0,6)) ? (int) $tpl['option_arr']['o_week_start'] : 0;
					$jqDateFormat = pjUtil::jqDateFormat($tpl['option_arr']['o_date_format']);
					
					if(isset($tpl['enquiry_message']))
					{
						$front_err = __('front_error', true);
						if($tpl['enquiry_message'] == 'FR02')
						{
							?><div class="alert alert-success"><?php echo $front_err[$tpl['enquiry_message']];?></div><?php
						}else{
							if($tpl['enquiry_message'] == 'FR03')
							{
								?><div class="alert alert-danger"><?php echo $front_err[$tpl['enquiry_message']];?></div><?php
							}else{
								$register_status = __('register_status', true);
								?><div class="alert alert-danger"><?php echo $register_status[$tpl['enquiry_message']];?></div><?php
							}
						}
					} 
					?>
					
					<div class="form-group">
						<label for="" class="col-lg-3 col-md-3 col-sm-3 col-xs-12 control-label"><?php __('front_label_name'); ?></label>
					
						<div class="col-lg-9 col-md-9 col-sm-9 col-xs-12">
							<input type="text" name="name" class="form-control required" data-msg-required="<?php __('front_field_required');?>"/>
							<div class="help-block with-errors"><ul class="list-unstyled"></ul></div>
						</div><!-- /.col-lg-9 col-md-9 col-sm-9 col-xs-12 -->
					</div><!-- /.form-group -->
					
					<div class="form-group">
						<label for="" class="col-lg-3 col-md-3 col-sm-3 col-xs-12 control-label"><?php __('front_label_email'); ?></label>
					
						<div class="col-lg-9 col-md-9 col-sm-9 col-xs-12">
							<input type="email" name="email" class="form-control required pjVpEmail" data-msg-required="<?php __('front_field_required');?>" data-msg-pjVpEmail="<?php __('front_email_invalid');?>"/>
							
							<div class="help-block with-errors"><ul class="list-unstyled"></ul></div>
						</div><!-- /.col-lg-9 col-md-9 col-sm-9 col-xs-12 -->
					</div><!-- /.form-group -->
					
					<div class="form-group">
						<label for="" class="col-lg-3 col-md-3 col-sm-3 col-xs-12 control-label"><?php __('front_label_phone'); ?></label>
					
						<div class="col-lg-9 col-md-9 col-sm-9 col-xs-12">
							<input type="text" name="phone" class="form-control"/>
						</div><!-- /.col-lg-9 col-md-9 col-sm-9 col-xs-12 -->
					</div><!-- /.form-group -->
					
					<div class="form-group">
						<label for="" class="col-lg-3 col-md-3 col-sm-3 col-xs-12 control-label"><?php __('front_period');?></label>

						<div class="col-lg-9 col-md-9 col-sm-9 col-xs-12">
							<div class="input-group pjVpCalendar pjVpGroupCalendar">
								<span class="input-group-addon pjVpCalendarTrigger pjVpCalendarTriggerFrom">
									<i class="fa fa-calendar"></i>
								</span>
								<input type="text" name="date_from" data-fday="<?php echo $week_start; ?>" data-dformat="<?php echo $jqDateFormat; ?>" class="form-control pjVpCalendarInput pjVpCalendarInputFrom" placeholder="<?php __('front_label_from');?>" readonly data-months="<?php echo join(',', $months);?>" data-shortmonths="<?php echo join(',', $short_months);?>" data-day="<?php echo join(',', $days);?>" data-daymin="<?php echo join(',', $short_days);?>" />
									
								<span class="input-group-addon pjVpCalendarTrigger pjVpCalendarTriggerTo">
									<i class="fa fa-calendar"></i>
								</span>
								<input type="text" name="date_to" data-fday="<?php echo $week_start; ?>" data-dformat="<?php echo $jqDateFormat; ?>" class="form-control pjVpCalendarInput pjVpCalendarInputTo" placeholder="<?php __('front_label_to');?>" readonly data-months="<?php echo join(',', $months);?>" data-shortmonths="<?php echo join(',', $short_months);?>" data-day="<?php echo join(',', $days);?>" data-daymin="<?php echo join(',', $short_days);?>" />
							</div><!-- /.input-group pjVpCalendar pjVpGroupCalendar -->
							<input type="hidden" name="period" value="" data-msg-required="<?php __('front_field_required');?>"/>
							<div class="help-block with-errors"><ul class="list-unstyled"></ul></div>
						</div><!-- /.col-lg-9 col-md-9 col-sm-9 col-xs-12 -->
					</div><!-- /.form-group -->
					
					<div class="form-group">
						<label for="" class="col-lg-3 col-md-3 col-sm-3 col-xs-12 control-label"><?php __('front_label_notes'); ?></label>
					
						<div class="col-lg-9 col-md-9 col-sm-9 col-xs-12">
							<textarea rows="4" name="notes" class="form-control"></textarea>
						</div><!-- /.col-lg-9 col-md-9 col-sm-9 col-xs-12 -->
					</div><!-- /.form-group -->
					
					<div class="form-group pjVpFormGroupCaptcha">
						<label for="" class="col-lg-3 col-md-3 col-sm-3 col-xs-12 control-label"><?php __('front_label_captcha'); ?></label>
					
						<div class="col-lg-9 col-md-9 col-sm-9 col-xs-12">
							<div class="row">
								<div class="col-lg-3 col-md-4 col-sm-4 col-xs-5 pjVrCaptchaFieldOutter">
									<input id="pjVpCaptchaField" type="text" name="captcha" class="form-control required" maxlength="6" autocomplete="off" data-msg-required="<?php __('front_field_required');?>" data-msg-remote="<?php __('front_captcha_incorrect');?>"/>
								</div><!-- /.col-lg-3 col-md-4 col-sm-4 col-xs-5 -->

								<div class="col-lg-3 col-md-3 col-sm-4 col-xs-5">
									<img id="pjVpCaptchaImage" class="property-captcha" src="<?php echo PJ_INSTALL_FOLDER;?>index.php?controller=pjFront&amp;action=pjActionCaptcha&amp;rand=<?php echo rand(1, 999999); ?>" alt="CAPTCHA" style="vertical-align: middle;cursor: pointer;"/>
								</div><!-- /.col-lg-3 col-md-3 col-sm-4 col-xs-5 -->
							</div><!-- /.row -->
							<div class="help-block with-errors"><ul class="list-unstyled"></ul></div>
						</div><!-- /.col-lg-9 col-md-9 col-sm-9 col-xs-12 -->
					</div><!-- /.form-group pjVpFormGroupCaptcha -->
					
					<div class="form-group pjVpFormActions">
						<label for="" class="col-lg-3 col-md-3 col-sm-3 col-xs-12 control-label">&nbsp;</label>
						<div class="col-lg-9 col-md-9 col-sm-9 col-xs-12">
							<button type="submit" class="btn btn-default pjVpBtn pjVpBtnPrimary"><?php __('front_label_send_request');?></button>
						</div><!-- /.col-lg-9 col-lg-offset-3 col-md-9 col-md-offset-3 col-sm-9 col-sm-offset-3 col-xs-12 -->
					</div><!-- /.form-group pjVpFormActions -->
				</form><!-- /.form-horizontal pjVpFormReservation -->
			</div><!-- /.col-lg-8 col-md-8 col-sm-8 col-xs-12 -->
			<?php
			if(!empty($tpl['arr']['listing_terms']))
			{ 
				?>		
				<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
					<div class="well well-sm pjVpBookingTerms">
						<p class="pjVpBookingTermsTitle"><?php __('front_label_booking_terms'); ?></p>
						
						<div class="pre-scrollable">
							<?php echo nl2br(stripslashes($tpl['arr']['listing_terms'])); ?>
						</div><!-- /.pre-scrollable -->
					</div><!-- /.well well-sm pjVpBookingTerms -->
				</div><!-- /.col-lg-4 col-md-4 col-sm-4 col-xs-12 -->
				<?php
			} 
			?>
		</div><!-- /.row -->
	</div><!-- /.panel-body pjVpProductSectionBody -->
</div><!-- /.panel panel-default pjVpProductSection -->