
<?php get_header(); ?>

 <div class="sixteen columns">
<div class="page-background">
	  <h2 class="blog-heading"><?php echo of_get_option('ptr_hdn'); ?></h2> <div class="blog-heading-sp"></div><div class="blog-heading-desc"><?php echo of_get_option('ptr_desc'); ?></div>
      <div class="clear"></div>
</div>	<!-- end: background --> 
<div class="s-space"></div>
 </div><!-- end: sixteen columns -->

   <div class="sixteen columns">
   <div class="catchy-main-po">
 <h2 class="catchy-po"><?php echo of_get_option('ptr_tro'); ?></h2>
  <div class="catchy-desc-po"><?php echo of_get_option('tro_desc'); ?></div> </div></div>
 
 
  <div class="sixteen columns">
 
<?php
				 $terms = get_terms("tagportifolio");
				 $count = count($terms);
				 echo '<ul id="portfolio-filter">';
					echo '<li><a href="#all" title="">All</a></li>';
				 if ( $count > 0 ){
					
						foreach ( $terms as $term ) {
							
							$termname = strtolower($term->name);
							$termname = str_replace(' ', '-', $termname);
							echo '<li><a href="#'.$termname.'" title="" rel="'.$termname.'">'.$term->name.'</a></li>';
						}
				 }
				 echo "</ul>";
			?>
			
			<!--<ul id="portfolio-filter">
				<li><a href="#all">All</a>
				<li><a rel="jquery" href="#jquery">jQuery</a>
				<li><a rel="webdesign" href="#webdesign">Webdesign</a>
			</ul>-->
			
			<?php 
				$loop = new WP_Query(array('post_type' => 'project', 'posts_per_page' => 8));
				$count =0;
			?>
			
			<div id="portfolio-wrapper">
				<ul id="portfolio-list">
			
				<?php if ( $loop ) : 
					 
					while ( $loop->have_posts() ) : $loop->the_post(); ?>
					
						<?php
						$terms = get_the_terms( $post->ID, 'tagportifolio' );
								
						if ( $terms && ! is_wp_error( $terms ) ) : 
							$links = array();

							foreach ( $terms as $term ) 
							{
								$links[] = $term->name;
							}
							$links = str_replace(' ', '-', $links);	
							$tax = join( " ", $links );		
						else :	
							$tax = '';	
						endif;
						?>
						
						<?php $infos = get_post_custom_values('_url'); ?>
						
						<li class="portfolio-item <?php echo strtolower($tax); ?> all">
								<div class="port-thumb"><div class="feature-fix-it"><a href="<?php the_permalink() ?>"><?php the_post_thumbnail( array(400, 160) ); ?></a></div></div>
							
							
							
						</li>
						
					<?php endwhile; else: ?>
					 
					<li class="error-not-found">Sorry, no portfolio entries for while.</li>
						
				<?php endif; ?>
			

				</ul>

			
			
			</div> <!-- end #portfolio-wrapper-->
							
				<!-- 
				<ul id="portfolio-list">
					<li class="portfolio-item webdesign">
						<div class="thumb"><a href="#"><img src="/hifi/site/edit/blog/" alt=""></a></div>
						<h3>PROJECT TITLE</h3>
						<p class="excerpt">Excerpt here...</p>
						<p class="links"><a href="#" class="with-arrow" target="_blank">Live Preview</a> <a href="#" class="with-arrow">More Details</a></p>
					</li>
				</ul>
				-->
			
			<script>
				jQuery(document).ready(function() {	
					jQuery("#portfolio-list").filterable();
				});
			</script>
			  <div class="clear"></div><div class="po-space"></div>
			 </div><!-- end: sixteen columns -->
			 
<?php get_footer(); ?>
 
 




  

  




	  
	  
	  
	  










