<?php   
if(get_theme_mod('package_area_disable') != 'on' ){ ?>
	<?php 
	if( get_theme_mod('package_areaTpadding',true) ) {
		$package_areaTpadding = 'padding-top:'.esc_attr(get_theme_mod('package_areaTpadding')).';';
	}
	if( get_theme_mod('package_areaBpadding',true) ) {
		$package_areaBpadding = 'padding-bottom:'.esc_attr(get_theme_mod('package_areaBpadding')).';';
	}
	if( get_theme_mod('package_areaOpacity',true) ) {
		$package_areaOpacity = 'opacity:'.esc_attr(get_theme_mod('package_areaOpacity')).';';
	}
	?>	

	<div class="package-area wow bounceInRight" id="package" style="<?php echo esc_attr($package_areaTpadding); ?>" "<?php echo esc_attr($package_areaBpadding); ?>">

		<div class="package-single-area" > 
			<?php
			$package_page_id = get_theme_mod('packages_page');	
			$package_maintitle = get_theme_mod('packages_maintitle', '<span>Tour</span> Packages');
			$package_subtitle = get_theme_mod('packages_subtitle', 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has industrys.');
			?>
			<div class="container">
				
				<div class="row justify-content-center">
					<?php if($package_maintitle || $package_subtitle) { ?>
					<div class="col-xl-6 col-lg-6 col-sm-8">
						<div class="section-title">
							<h2><?php echo ($package_maintitle);  ?></h2>
							<p><?php echo ($package_subtitle);  ?></p>
							
						</div>
					</div>
					<?php }?>
				</div>
			</div>
			<div class="container">
				<?php 
				$showStatic = true;
				$cols = get_theme_mod('package_npp_count', 2);
				$cols++;
				switch($cols){
					case 1:
					$colCls = 'col-md-12 col-sm-12';
					break;
					case 2:	
					$colCls = 'col-md-6 col-sm-6';
					break;
					case 3:
					case 5:
					case 6:
					case 9:
					case 11:
					$colCls = 'col-md-4 col-sm-6';
					break;
					default: 
					$colCls = 'col-md-3 col-sm-6';
					break;
				}
				for( $i = 1; $i <= $cols; $i++ ){
					$package_page_id = get_theme_mod('package_page'.$i); 
					$package_page_icon = get_theme_mod('package_page_icon'.$i);
					$package_page_icon1 = get_theme_mod('package_page_icon1'.$i);
					if($package_page_id){
						$showStatic = false;
						echo packageShortCode($package_page_id, $isCustomizer=true, $i);
					}
				}
				if($showStatic === true){
					for( $i = 1; $i <= $cols; $i++ ){ ?>
						<div class="<?php echo $colCls;?> single-package-bx">
							<div class="single-package">

								<div class="package-icon">
									<a href="#">
									 <img class="img-responsive" src="<?php echo esc_url(get_template_directory_uri().'/images/package01.jpg');?>" alt="package" /></a>
										<div class="ovrly"></div>
								</div>
								<div class="package-title-box">
									<a href="#">
									  <h4>Aliquam vitae hendrerit justo. vitae Phasellus suscipit.</h4>
									</a>
									<div class="pkloctn">
										<div class="col-md-1 col-sm-1 col-xs-1 pd-0">
											<i class="fa fa-map-marker"></i>
										</div>
										<div class="col-md-11 col-sm-11 col-xs-11 pkloctntext pd-0">
											Suzhou - China
										</div>
										<div class="clearfix"></div>
									</div>
									<p class="pk-text">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has industrys.</p> 
									<div class="col-md-8 pd-0">
										<div class="pkday">
											Duration- <b>10 Days or 09 Nights</b>
										</div> 
									</div>
									<div class="col-md-4 pkinprce">
										<div class="pkprice">
											Form- <b>$199</b>
										</div> 
									</div>
								</div>
							</div>
						</div>
						<?php 
					}
				} ?>

		<div class="clearfix"></div>
		</div>
	<div class="clearfix"></div>
	</div>
</div>
	<script>
		jQuery.noConflict();
		$(function(){
			function singlepackageHeight(){
				var ht = 0;
				$('#package .single-package').each(function(i){
					var tHt = $(this).height();
					if(ht<tHt){
						ht=tHt;
					}
				});
				$('#package .single-package').height(ht+'px');
			}
			singlepackageHeight();
		});
		$( window ).resize(function(){
			singlepackageHeight();
		});
	</script>

<?php }
