<link href="<?php echo base_url();?>assets/css/style.css" rel="stylesheet">
<div id="wrapper">
	<div id="columns">
	<?php foreach($listings as $listing){ 
		$images=$this->postings_model->getPostingImages($listing->id);
		
		if(count($images)>0){
			$item_image=$images->image_url;
		}else{
			$item_image='default.png';
		}
		?>
		<div class="pin">
			<a href="<?php echo base_url();?>details/<?php echo formatText($listing->title);?>/<?php echo $listing->id;?>"><?php echo show_thumb($item_image,250,250,'class="img-thumbnail"');?></a>
			<p>
				<a href="<?php echo base_url();?>details/<?php echo formatText($listing->title);?>/<?php echo $listing->id;?>"><?php echo $listing->title;?></a><br><?php echo strlen($listing->description) > 100 ? substr($listing->description,0,100) : $listing->description;?>
			</p>
		</div>
	<?php } ?>
	
		<!--<div class="pin">
			<img src="http://cssdeck.com/uploads/media/items/1/1swi3Qy.png" />
			<p>
				Donec a fermentum nisi. 
			</p>
		</div>
	
		<div class="pin">
			<img src="http://cssdeck.com/uploads/media/items/6/6f3nXse.png" />
			<p>
				Nullam eget lectus augue. Donec eu sem sit amet ligula 
				faucibus suscipit. Suspendisse rutrum turpis quis nunc 
				convallis quis aliquam mauris suscipit.
			</p>
		</div>
	
		<div class="pin">
			<img src="http://cssdeck.com/uploads/media/items/8/8kEc1hS.png" />
			<p>
				Nullam eget lectus augue. Donec eu sem sit amet ligula 
				faucibus suscipit. Suspendisse rutrum turpis quis nunc 
				convallis quis aliquam mauris suscipit.
			</p>
		</div>
	
		<div class="pin">
			<img src="http://cssdeck.com/uploads/media/items/1/1swi3Qy.png" />
			<p>
				Donec a fermentum nisi. Integer dolor est, commodo ut 
				sagittis vitae, egestas at augue. 
			</p>
		</div>
	
		<div class="pin">
			<img src="http://cssdeck.com/uploads/media/items/6/6f3nXse.png" />
			<p>
				Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
				Sed feugiat consectetur pellentesque. Nam ac elit risus, 
				ac blandit dui. Duis rutrum porta tortor ut convallis.
				Duis rutrum porta tortor ut convallis.
			</p>
		</div>	
		
		<div class="pin">
			<img src="http://cssdeck.com/uploads/media/items/2/2v3VhAp.png" />
			<p>
				Nullam eget lectus augue. Donec eu sem sit amet ligula 
				faucibus suscipit. Suspendisse rutrum turpis quis nunc 
				convallis quis aliquam mauris suscipit.
				Duis rutrum porta tortor ut convallis.
			</p>
		</div>
	
		<div class="pin">
			<img src="http://cssdeck.com/uploads/media/items/1/1swi3Qy.png" />
			<p>
				Nullam eget lectus augue. 
			</p>
		</div>
	
		<div class="pin">
			<img src="http://cssdeck.com/uploads/media/items/8/8kEc1hS.png" />
			<p>
				Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
				Sed feugiat consectetur pellentesque. 
			</p>
		</div>
	
		<div class="pin">
			<img src="http://cssdeck.com/uploads/media/items/2/2v3VhAp.png" />
			<p>
				Donec a fermentum nisi. Integer dolor est, commodo ut 
				sagittis vitae, egestas at augue. Suspendisse id nulla 
				ac urna vestibulum mattis. Duis rutrum porta tortor ut convallis.
			</p>
		</div>
	
		<div class="pin">
			<img src="http://cssdeck.com/uploads/media/items/1/1swi3Qy.png" />
			<p>
				Donec a fermentum nisi. Integer dolor est, commodo ut 
				sagittis vitae, egestas at augue. Suspendisse id nulla 
				ac urna vestibulum mattis. 
			</p>
		</div>
	
		<div class="pin">
			<img src="http://cssdeck.com/uploads/media/items/6/6f3nXse.png" />
			<p>
				Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
				Sed feugiat consectetur pellentesque. Nam ac elit risus, 
				ac blandit dui. Duis rutrum porta tortor ut convallis.
			</p>
		</div>	
		
		<div class="pin">
			<img src="http://cssdeck.com/uploads/media/items/2/2v3VhAp.png" />
			<p>
				Donec a fermentum nisi. Integer dolor est, commodo ut 
				sagittis vitae, egestas at augue. Suspendisse id nulla 
				ac urna vestibulum mattis. 
			</p>
		</div>
	
		<div class="pin">
			<img src="http://cssdeck.com/uploads/media/items/1/1swi3Qy.png" />
			<p>
				Donec a fermentum nisi. Integer dolor est, commodo ut 
				sagittis vitae, egestas at augue. Suspendisse id nulla 
				ac urna vestibulum mattis. 
			</p>
		</div>
	
		<div class="pin">
			<img src="http://cssdeck.com/uploads/media/items/6/6f3nXse.png" />
			<p>
				Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
				Sed feugiat consectetur pellentesque. Nam ac elit risus, 
				ac blandit dui. Duis rutrum porta tortor ut convallis.
			</p>
		</div>-->
	</div>
</div>
