<?php get_header(); ?>

 <div class="sixteen columns">
<div class="flexslider">
          <ul class="slides">
		  
		  <?php  $item = of_get_option('mt_slide_number');
		         $itemcat = of_get_option('mt_slide_categories');
				 $query = new WP_Query( array( 'cat' => $itemcat,'posts_per_page' =>$item ) );
				 if ($query->have_posts()) : while ($query->have_posts()) : $query-> the_post(); ?>
				 
		  <li>  
		  <div class="fix-slide">
		  <?php $image_attr = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'slide_post'); ?>
		  <a href="<?php the_permalink() ?>"> <img src="<?php echo $image_attr[0]; ?>"></a>
		  </div>
		  </li>		 
		  
		  <?php endwhile; endif; ?>
</ul>		  
<div style="border-bottom:9px solid #f8f8f8; margin-top:-12px;"></div>
</div>	<!-- end: flexslider --> 

 </div><!-- end: sixteen columns -->
 
  <div class="sixteen columns">
   <div class="catchy-main">
 <h2 class="catchy"><?php echo of_get_option('catchy_heading'); ?></h2>
  <div class="catchy-desc"><?php echo of_get_option('catchy_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><!-- end: sixteen columns -->
 
 



 <div class="sixteen columns">
  <div class="about-info">  <div class="about-info-text"><?php echo of_get_option('service_heading'); ?></div></div>
  </div>
  
 
   <div class="about_grid">
   
    <h2 class="about-title"><?php echo of_get_option('service_firstt'); ?></h2>
	   <div class="about-desc"><?php echo of_get_option('service_first'); ?></div>
       
   </div>
      <div class="about_grid">
   
    <h2 class="about-title"><?php echo of_get_option('service_secondd'); ?></h2>
	   <div class="about-desc"><?php echo of_get_option('service_second'); ?></div>
   
   </div>
      <div class="about_grid">
   
    <h2 class="about-title"><?php echo of_get_option('service_third'); ?></h2>
	     <div class="about-desc"><?php echo of_get_option('service_thirdd'); ?></div>
   
   </div>
      <div class="about_grid">
   
    <h2 class="about-title"><?php echo of_get_option('service_fourth'); ?></h2>
	      <div class="about-desc"><?php echo of_get_option('service_fourtht'); ?></div>
    
   </div>




	  
	  
	  
	  


<?php get_footer(); ?>







