

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script>
<script src="<?php echo BASE_URL; ?>js/jquery.ui.touch-punch.min.js" type="text/javascript"></script>
<script src="<?php echo BASE_URL; ?>js/facescroll.js" type="text/javascript"></script>

<script type="text/javascript">
	jQuery(function(){ // on page DOM load
		if(window.innerWidth > 991)
			$('.cotegory_list_box_scroll').alternateScroll();
	})
</script>

<div class="mid_section">
	<div class="container">
		<div class="row">
			<div class="cont_outer">
			<div class="col-xs-12">
				<h2>Select a classifieds category to find what you are looking for</h2>
			</div>
			<div class="category_list_wrap">
				<?php
				if($this->category_flag){
					foreach($this->category as $category_key => $category_val){
						//echo"<br>!!!!!!!!!!",$category_key;
					?>
					<div class="col-xs-12 col-md-6 col-lg-4">
						<div class="cotegory_list_box cotegory_list_box_scroll" >
						
						<h2>
							<a href="<?php echo ConfigUrl::base();?>index/listing/<?php echo $category_key.'/';?>">
								<?php echo $this->category_title[$category_key]; ?>
							</a>
							<a href="<?php echo ConfigUrl::base();?>index/listing/<?php echo $category_key.'/';?>" class="view_all">View All</a>
						</h2>
						<div class="cat_lists">
							<?php
							if(!empty($category_val)){
							?>
							<ul>
								<?php
								foreach($category_val as $subcat_key => $subcat_val){
								if($subcat_val['type']=='1'){?>
								 <li><a href="<?php echo ConfigUrl::base();?>index/listing/<?php echo $category_key;?>/<?php echo $subcat_key;?>/"><i class="fa fa-angle-right" aria-hidden="true"></i><?php echo substr($subcat_val['title'],0,25); ?><?php echo (strlen($subcat_val['title'])>25)?' ...':''; ?></a></li>   
								<?php
								}elseif($subcat_val['type']=='2'){?>
								   <li><a href="<?php echo ConfigUrl::base();?>index/pagelisting/<?php echo $subcat_key;?>/"><i class="fa fa-angle-right" aria-hidden="true"></i><?php echo substr($subcat_val['title'],0,25); ?><?php echo (strlen($subcat_val['title'])>25)?' ...':''; ?></a></li>    
								<?php
								}?>
								
								<?php
								}
								?>
							</ul>
							<?php
							}
							else{
							?>
								<div class="no_item_text">No Items Found!</div>
							<?php
							}
							?>
							<div class="clear"></div>
						</div>
				
					 
				
						<div class="clear"></div>
						</div>
					</div>
					<?php
					}
				}
				?>
				<div class="clear"></div>
				</div>
			
			<!-- Popular category wrap -->
			
			
			
			<div class="clear"></div>
			</div>
		</div>
	</div>
	
	<div class="popular_category_div">
		<div class="container">
		<div class="row">
			<div class="col-xs-12 col-sm-6">
			<h3>Popular Classifieds Categories</h3>
			
			<div class="popular_cat_divwrp">
			<div class="popuplar_cat_inner_div1">
			<ul>
				<?php
				$counter=0;
				foreach($this->popularclassifieds as $popc)
				{
				$counter++;
				
				$catLink = ($popc->nParentId != '' && $popc->nParentId != 0)?$popc->nParentId.'/'.$popc->nCategoryId:$popc->nCategoryId;
				
			?>
				<li><a href="<?php echo Configurl::base().'index/listing/'.$catLink.'/';?>"><i class="fa fa-angle-right" aria-hidden="true"></i> &nbsp; <?php echo $popc->vCategoryDesc; ?></a></li>
				<?php
				if($counter==7)
				{
					echo '</ul>
			<div class="clear"></div>
			</div>
			<div class="popuplar_cat_inner_div2">
			<ul>';
				}
			
				} ?>
			
			</ul>
			<div class="clear"></div>
			</div>
			
			
			<div class="clear"></div>
			</div>
			
			<div class="clear"></div>
			</div>
			
			<div class="col-xs-12 col-sm-6">
			
			<h3>Popular Searches</h3>
			
			<div class="popular_cat_divwrp">
				<div class="popuplar_cat_inner_div1">
					<ul>
					
					<?php
						$counter=0;
						foreach($this->popularsearches as $popc)
						{
							//echopre($popc);
						$counter++;
					?>
						<li><a href="<?php echo Configurl::base().'index/pagelisting/'.$popc->alias.'/';?>"><i class="fa fa-angle-right" aria-hidden="true"></i> &nbsp; <?php echo $popc->Title; ?></a></li>
						<?php
						if($counter==7)
						{
							echo '</ul>
					<div class="clear"></div>
					</div>
					<div class="popuplar_cat_inner_div2">
					<ul>';
						}
					
						} ?>
					
					
					</ul>
				<div class="clear"></div>
				</div>
			
			
			<div class="clear"></div>
			</div>
			
			<div class="clear"></div>
			</div>
			
			
				<div class="clear"></div>
			</div>
		<div class="clear"></div>
		</div>
		<div class="clear"></div>
		</div>
			<div class="clear"></div>
			<!-- Popular category wrap -->
			
			<div class="clear"></div>
			</div>
			
			
			
			<div class="clear"></div>
			</div>
			
