<?php
/*
Template Name: Product
*/
?>
<?php get_header();?>



<div id="main" role="main">				
				<div class="pagecontent">					
					<div class="cols noright">
                   			<div class="sidebar">
						<nav class="testimonials">
                            
					<?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('product_left')) : else : ?>  
       
    <?php endif; ?>
                   </nav> 	</div>
    <div>
	 <section class="cols productinfo" itemscope itemtype="http://schema.org/Product">

       <div>
                     
                        	
        <?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
          
          <hgroup><h1><?php the_title(); ?></h1><h2>  <?php
{ $subtitle = get_post_meta
($post->ID, 'subtitle', $single = true); 

if($subtitle !== '') echo $subtitle;} ?></h2></hgroup>

       <p>  <?php the_excerpt(); ?></p>
           
        </div>
          				 <div class="sidebar">
            
	<h4>Locate A Franchise</h4>
	
<p>Please enter your postcode to find a Chem-Dry franchise near you.
	</p>
        
        
	
	<form action="<?php bloginfo('url'); ?>" method="get">
	<div class="styled-select">
	<?php wp_dropdown_categories('show_count=0&hierarchical=0&child_of=13'); ?> </div>
	<input type="submit" name="submit" class="button green alt value="view" />
	
	  </form>
</div>	
 

<?php if ( has_post_thumbnail() ) {
	the_post_thumbnail();
}
?> 

       
        <ul id="gallery">
      
            <li><a class="fancybox" rel="gallery1" href="<?php the_field('product_image_one'); ?>"><img src="<?php the_field('product_image_one'); ?>"  /></a></li>  
        
 <li><a class="fancybox" rel="gallery1" href="<?php the_field('product_image_two'); ?>"><img src="<?php the_field('product_image_two'); ?>"  /></a></li>    <li><a class="fancybox" rel="gallery1" href="<?php the_field('product_image_three'); ?>"><img src="<?php the_field('product_image_three'); ?>"  /></a></li>            
        </ul>
        
     
        
        <div class="description" itemprop="description">
     
             <?php the_content(); ?>
           
		
     <?php endwhile; ?>

       
         
        <?php endif; ?>     </div>
        
        <a href="#" class="moreinfo">More Info</a>
	
    </section>
<div>
		<?php get_template_part('product_feature'); ?> 	</div>	</div>  
        </div>				
				</div>				
			</div>

<?php get_footer();?>
