<?php
/*

Template Name: spa

*/
?>
<?php get_header(); ?>
<?php wp_reset_postdata(); ?>
<?php $featuredImageType = get_field('background_image_type'); ?>
<?php setBgImg();  ?>

<main class="content1 aboutUsPage <?php echo $featuredImageType; ?>">
<div class="breadcrumb_box"> <div class="container"><?php
echo do_shortcode( '[breadcrumb]' ); 
?></div></div>

	
        
	<section class="pageImage">
<?php putRevSlider("spa_banner") ?>
	</section>
	
			
</main>
<div class="container">
		<div>
			<!--<section class="pageTitle text-center">
				<div class="um_helper">
					<div class="um_middle">
						<h3 class="title pageTitle titleUp"><?php /*?><?php the_title(); ?><?php */?></h3>
					</div>
				</div>
			</section>-->
			
			
			<?php if(get_the_content()): ?>
            
				<section class="theContent padtop50">
              
					<?php the_content(); ?>
				</section>
			<?php endif; ?>
				
				
				 
				
				<section class="staffMembers">
					<div class="row aboutContent um_masonry">
						
						<?php 
						$members = get_field('members');
						if($members):
							foreach($members as $member):
					 ?>
					 <div class="um_masonryItem <?php the_field('columns'); ?>">
								<article class="theBox staffBox mainBgColor">
			                            <div class="boxContent">	
	                               			<?php $image = wp_get_attachment_image_src($member['image'], 'blogMasonry'); ?>
											<img src="<?php echo $image[0]; ?>">
			                            </div>
			                            <footer>
			                                <div class="roomTitle um_left">
			                                	<?php 
			                                			$link = false;
														if(($member['link'] != "")  && ($member['link'] != "http://")){
															$link = true;
														} 
			                                	 ?>
			                                	 <?php if($link): ?>
                                	 				<?php
		                                    			  $newTab = '';
														  if($member['new_tab']){
														  	$newTab = '_blank';
														  }
													 ?>
			                                    	<a href="<?php echo $member['link']; ?>"  target="<?php echo $newTab; ?>"><h5 class="title titleUp"><?php echo $member['full_name']; ?></h5></a>
			                                    <?php else: ?>
			                                    	<h5 class="title titleUp"><?php echo $member['full_name']; ?></h5>
			                                    <?php endif; ?>
			                                    <h6><?php echo $member['role']; ?></h6>
			                                </div>
			                                	<?php if($member['social_networks']): ?>
			                                		<div class="staffLinks um_right">
		                                			 	<div class="boxIcons list-unstyled list-inline text-right">
					                                		<?php foreach($member['social_networks'] as $network): ?>
				                                				<?php
					                                    			  $newTab = '';
																	  if($network['new_tab']){
																	  	$newTab = '_blank';
																	  }
																 ?>          
								                               <a class="iconHolder brandHover text-center" href="<?php echo $network['link']; ?>" target="<?php echo $newTab; ?>" ><i class="fa <?php echo $network['network'];?> "></i></a>
							                                <?php endforeach; ?>
					                                  </div>
				                                  	</div>
					                              <?php endif; ?> 
			                                <div class="staffDescription">
			                                	<?php echo $member['description']; ?>
			                                </div>
			                            </footer>
			                        </article>
		                        </div>
                        <?php endforeach; ?>
                   <?php endif; ?> 
						
					</div>
				</section>
				
				
				
				
				
				
				
				
					
		</div>
	</div>
<?php get_footer(); ?>