<?php get_header(); ?>

<div id="core" class="gallary template_page">
  <div class="inner-page-section">
    <div class="container">
      <div class="gallary_section gallery_details">
      
       <a href="<?php echo site_url();?>/video-gallery" class="backbtn"><img src="<?php echo  bloginfo('template_url');?>/images/black_arrow.png" alt="" /> Back</a>
      
        <?php while ( have_posts() ) : the_post();?>
        <h2 class="inner-heading-txt">
          <?php the_title();?>
        </h2>
        <div class="blog_content">
          <?php the_content(); ?>
        </div>
        <div class="gallary-posts">
          <?php
                $num=0;
                 while ( have_rows('images') ) : the_row();
			$num++;
			$image 	= get_sub_field('gallery_image');
			
			//$image_description = get_sub_field('image_description');
			//$image_dim = (($row == 1)?$array1:$array2);
			$imgurl = wp_get_attachment_image_url( $image['id'], 'full'); 

			?>
          <div class="pic-section">
            <div class="post-thumb-wrapp">
              <div class="gallary">
                 <a class="fancybox" href="<?php echo $image['url']; ?>"> <?php echo wp_get_attachment_image($image['id'], array('700', '600'),false, array( "class" => "" ) );?> </a>
              </div>
            </div>
          </div>
          <?php endwhile;?>
        </div>
        <?php endwhile;
		wp_reset_query();?>
      </div>
    </div>
  </div>
</div>
<div class="clearfix"></div>
<script type="text/javascript">
	$(document).ready(function() {
		$(".fancybox")
         .attr('rel', 'gallery')
         .fancybox({
			padding : 0,
			smallBtn : false,
             toolbar  : false,
			  wrapCSS    : 'gallery_poup_box',
		});
	});
</script>
<?php get_footer(); ?>
