<?php
ob_start();
if (!empty($tpl['arr']['checkin']))
{
	$checkin_length = mb_strlen($tpl['arr']['checkin']);
	?>
	<li class="list-group-item">
		<div class="row">
			<div class="col-md-2 col-sm-2 col-xs-12">
				<p class="pjVpProductPolicyTitle"><strong><?php __('front_label_checkin');?></strong></p>
			</div><!-- /.col-md-2 col-sm-2 col-xs-12 -->
		
			<div class="col-md-10 col-sm-10 col-xs-12">
				<?php
				if($checkin_length <= 400)
				{ 
					?><p><?php echo nl2br(stripslashes($tpl['arr']['checkin']));?></p><?php 
				}else{
					?>
					<div id="pjVpShortCheckinNotes_<?php echo $index;?>" class="pjVpCheckinNotes">
						<p><?php echo nl2br(stripslashes(pjUtil::truncateDescription($tpl['arr']['checkin'], 400, ' ')));?></p>
						<a class="btn btn-link pjVpBtn pjVpBtnLink pjVpShowCheckinNotes" href="#" data-show="all"><?php __('front_label_show_all');?></a>
					</div>
					<div id="pjVpFullCheckinNotes_<?php echo $index;?>" class="pjVpCheckinNotes" style="display:none;">
						<p><?php echo nl2br(stripslashes($tpl['arr']['checkin']));?></p>
						<a class="btn btn-link pjVpBtn pjVpBtnLink pjVpShowCheckinNotes" href="#" data-show="less"><?php __('front_label_show_less');?></a>
					</div>
					<?php
				}
				?>
			</div><!-- /.col-md-10 col-sm-10 col-xs-12 -->
		</div><!-- /.row -->
	</li><!-- /.list-group-item -->
	<?php
}
if (!empty($tpl['arr']['checkout']))
{
	$checkout_length = mb_strlen($tpl['arr']['checkout']);
	?>
	<li class="list-group-item">
		<div class="row">
			<div class="col-md-2 col-sm-2 col-xs-12">
				<p class="pjVpProductPolicyTitle"><strong><?php __('front_label_checkout');?></strong></p>
			</div><!-- /.col-md-2 col-sm-2 col-xs-12 -->
		
			<div class="col-md-10 col-sm-10 col-xs-12">
				<?php
				if($checkout_length <= 400)
				{ 
					?><p><?php echo nl2br(stripslashes($tpl['arr']['checkout']));?></p><?php 
				}else{
					?>
					<div id="pjVpShortCheckoutNotes_<?php echo $index;?>" class="pjVpCheckoutNotes">
						<p><?php echo nl2br(stripslashes(pjUtil::truncateDescription($tpl['arr']['checkout'], 400, ' ')));?></p>
						<a class="btn btn-link pjVpBtn pjVpBtnLink pjVpShowCheckoutNotes" href="#" data-show="all"><?php __('front_label_show_all');?></a>
					</div>
					<div id="pjVpFullCheckoutNotes_<?php echo $index;?>" class="pjVpCheckoutNotes" style="display:none;">
						<p><?php echo nl2br(stripslashes($tpl['arr']['checkout']));?></p>
						<a class="btn btn-link pjVpBtn pjVpBtnLink pjVpShowCheckoutNotes" href="#" data-show="less"><?php __('front_label_show_less');?></a>
					</div>
					<?php
				}
				?>
			</div><!-- /.col-md-10 col-sm-10 col-xs-12 -->
		</div><!-- /.row -->
	</li><!-- /.list-group-item -->
	<?php
}
if (!empty($tpl['arr']['pets']))
{
	$pets_length = mb_strlen($tpl['arr']['pets']);
	?>
	<li class="list-group-item">
		<div class="row">
			<div class="col-md-2 col-sm-2 col-xs-12">
				<p class="pjVpProductPolicyTitle"><strong><?php __('front_label_pets');?></strong></p>
			</div><!-- /.col-md-2 col-sm-2 col-xs-12 -->
		
			<div class="col-md-10 col-sm-10 col-xs-12">
				<?php
				if($pets_length <= 400)
				{ 
					?><p><?php echo nl2br(stripslashes($tpl['arr']['pets']));?></p><?php 
				}else{
					?>
					<div id="pjVpShortPetNotes_<?php echo $index;?>" class="pjVpPetNotes">
						<p><?php echo nl2br(stripslashes(pjUtil::truncateDescription($tpl['arr']['pets'], 400, ' ')));?></p>
						<a class="btn btn-link pjVpBtn pjVpBtnLink pjVpShowPetNotes" href="#" data-show="all"><?php __('front_label_show_all');?></a>
					</div>
					<div id="pjVpFullPetNotes_<?php echo $index;?>" class="pjVpPetNotes" style="display:none;">
						<p><?php echo nl2br(stripslashes($tpl['arr']['pets']));?></p>
						<a class="btn btn-link pjVpBtn pjVpBtnLink pjVpShowPetNotes" href="#" data-show="less"><?php __('front_label_show_less');?></a>
					</div>
					<?php
				}
				?>
			</div><!-- /.col-md-10 col-sm-10 col-xs-12 -->
		</div><!-- /.row -->
	</li><!-- /.list-group-item -->
	<?php
}
if (!empty($tpl['arr']['policies']))
{
	$policies_length = mb_strlen($tpl['arr']['policies']);
	?>
	<li class="list-group-item">
		<div class="row">
			<div class="col-md-2 col-sm-2 col-xs-12">
				<p class="pjVpProductPolicyTitle"><strong><?php __('front_label_policies');?></strong></p>
			</div><!-- /.col-md-2 col-sm-2 col-xs-12 -->
		
			<div class="col-md-10 col-sm-10 col-xs-12">
				<?php
				if($policies_length <= 400)
				{ 
					?><p><?php echo nl2br(stripslashes($tpl['arr']['policies']));?></p><?php 
				}else{
					?>
					<div id="pjVpShortPolicyNotes_<?php echo $index;?>" class="pjVpPolicyNotes">
						<p><?php echo nl2br(stripslashes(pjUtil::truncateDescription($tpl['arr']['policies'], 400, ' ')));?></p>
						<a class="btn btn-link pjVpBtn pjVpBtnLink pjVpShowPolicyNotes" href="#" data-show="all"><?php __('front_label_show_all');?></a>
					</div>
					<div id="pjVpFullPolicyNotes_<?php echo $index;?>" class="pjVpPolicyNotes" style="display:none;">
						<p><?php echo nl2br(stripslashes($tpl['arr']['policies']));?></p>
						<a class="btn btn-link pjVpBtn pjVpBtnLink pjVpShowPolicyNotes" href="#" data-show="less"><?php __('front_label_show_less');?></a>
					</div>
					<?php
				}
				?>
			</div><!-- /.col-md-10 col-sm-10 col-xs-12 -->
		</div><!-- /.row -->
	</li><!-- /.list-group-item -->
	<?php
}
if (!empty($tpl['arr']['fees']))
{
	$fees_length = mb_strlen($tpl['arr']['fees']);
	?>
	<li class="list-group-item">
		<div class="row">
			<div class="col-md-2 col-sm-2 col-xs-12">
				<p class="pjVpProductPolicyTitle"><strong><?php __('front_label_fees');?></strong></p>
			</div><!-- /.col-md-2 col-sm-2 col-xs-12 -->
		
			<div class="col-md-10 col-sm-10 col-xs-12">
				<?php
				if($fees_length <= 400)
				{ 
					?><p><?php echo nl2br(stripslashes($tpl['arr']['fees']));?></p><?php 
				}else{
					?>
					<div id="pjVpShortFeeNotes_<?php echo $index;?>" class="pjVpFeeNotes">
						<p><?php echo nl2br(stripslashes(pjUtil::truncateDescription($tpl['arr']['fees'], 400, ' ')));?></p>
						<a class="btn btn-link pjVpBtn pjVpBtnLink pjVpShowFeeNotes" href="#" data-show="all"><?php __('front_label_show_all');?></a>
					</div>
					<div id="pjVpFullFeeNotes_<?php echo $index;?>" class="pjVpFeeNotes" style="display:none;">
						<p><?php echo nl2br(stripslashes($tpl['arr']['fees']));?></p>
						<a class="btn btn-link pjVpBtn pjVpBtnLink pjVpShowFeeNotes" href="#" data-show="less"><?php __('front_label_show_less');?></a>
					</div>
					<?php
				}
				?>
			</div><!-- /.col-md-10 col-sm-10 col-xs-12 -->
		</div><!-- /.row -->
	</li><!-- /.list-group-item -->
	<?php
} 

$ob_polices_fees = ob_get_contents();
ob_end_clean();
if (!empty($ob_polices_fees))
{
	?>
	<div class="panel panel-default pjVpProductSection">
		<div class="panel-heading pjVpProductSectionHead">
			<h3 class="panel-title pjVpProductSectionTitle"><?php __('front_label_policies_fees'); ?></h3><!-- /.panel-title -->
		</div><!-- /.panel-heading pjVpProductSectionHead -->

		<div class="panel-body pjVpProductSectionBody">
			<ul class="list-group pjVpProductPolicies">
				<?php echo $ob_polices_fees; ?>
			</ul><!-- /.list-group pjVpProductPolicies -->
		</div><!-- /.panel-body pjVpProductSectionBody -->
	</div><!-- /.panel panel-default pjVpProductSection -->
	<?php 
}
?>