<?php
/*

Template Name: offer1

*/
?>
	
		<style type="text/css">
		
			*{ padding:0px; margin:0px; }
			body{ background:#D5DEE7; }
			a{ color:#C8DCE5; }
			h3{ margin: 10px 10px 0 10px; color:#FFF; font:18pt Arial, sans-serif; letter-spacing:-1px; font-weight: bold;  }
			
			.boxgrid{ 
				width: 325px; 
				height: 260px; 
				margin:10px; 
				float:left; 
				background:#161613; 
				border: solid 2px #8399AF; 
				overflow: hidden; 
				position: relative; 
			}
				.boxgrid img{ 
					position: absolute; 
					top: 0; 
					left: 0; 
					border: 0; 
				}
				.boxgrid p{ 
					padding: 0 10px; 
					color:#afafaf; 
					font-weight:bold; 
					font:10pt "Lucida Grande", Arial, sans-serif; 
				}
				
			.boxcaption{ 
				float: left; 
				position: absolute; 
				background: #000; 
				height: 100px; 
				width: 100%; 
				opacity: .8; 
				/* For IE 5-7 */
				filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
				/* For IE 8 */
				-MS-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";
 			}
 				.captionfull .boxcaption {
 					top: 260;
 					left: 0;
 				}
 				.caption .boxcaption {
 					top: 220;
 					left: 0;
 				}
				
		</style>

<?php if(isset($_REQUEST["um_page"])):
 			if(isset($_POST["paged"])):?>
 			
 			
 			<?php 
				
				if(isset($_POST["um_change"])){
					if($_POST["um_change"] == true){
						$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; 
					}else{
						$paged = $_POST["paged"];
					}
				}
				else{
					$paged = $_POST["paged"];
				}
			
			
				if(isset($_POST["um_cat"])){
						$filterData = $_POST['um_cat'];
						$tax_query = array('relation' => 'AND');
						$tax = '';
						$terms = array();
						
						foreach($filterData as $data){
	
								foreach($data as $cat)
								{	
									if($cat['selected'] != "um_all")
									{
										$tax = $cat['tax'];
										array_push($terms, $cat['selected']);		
							  		}
								}			
								if($tax != '')
								{
								 	array_push($tax_query,array(
						                        'taxonomy' => $tax,
						                        'terms' => $terms,
						                        'field' => 'slug',
						                        'include_children' => false,
						                        'operator' => 'IN'
						                        )
							            );
								}
						}
						$args = array(
							'post_type' => 'room_post',
							'orderby'	=>	'menu_order date',
							'order' 	=> 	'DESC',
							'paged'     => $paged,
							'tax_query' => $tax_query
							
						);
				}
				else{
		
						$args = array(
								'post_type' => 'room_post',
								'orderby'	=>	'menu_order date',
								'order' 	=> 	'DESC',
								'paged'     => $paged
							);
				}
		
						
				$the_Query = new WP_Query($args);
				while ($the_Query->have_posts()):
					$the_Query->the_post();?>

						
			       <div class="col-md-4 um_in animated">
	                        <article class="theBox roomsBox mainBgColor">
	                            <div class="boxContent">
	
									<?php if(has_post_thumbnail()): ?>
	                               		<a href="<?php the_permalink(); ?>">
	                               		<?php the_post_thumbnail('blogMasonry'); ?>	
	                           			</a>
	                            	<?php endif; ?>
	                            </div>
	                            <footer>
	                                <div class="roomTitle um_left">
	                                    <a href="<?php the_permalink(); ?>"><h5 class="title titleUp"><?php the_title(); ?></h5></a>
	                                    <h6><?php the_field('price_label'); ?></h6>
	                                </div>
	                                <div class="roomIcons um_right">
	                                    <div class="boxIcons list-unstyled list-inline text-right">
	                                        <a class="iconHolder brandHover text-center um_expand_lightbox " data-postID="<?php echo $post->ID; ?>" href="#"><i class="fa fa-expand"></i></a>
	                                        
	                                        	<?php 
													$redirectClass = 'um_book';
													if(get_field('redirect_to') != "booking"){
														$redirectClass = '';	
													}
												 ?>
	                                        <a class="iconHolder brandHover text-center <?php echo $redirectClass; ?>" data-postID="<?php echo $the_Query->post->ID; ?>" href="<?php the_field('shop_link',$the_Query->post->ID); ?>"><i class="fa fa-bookmark-o"></i></a>
	                                        
	                                    </div>
	                                </div>
	                            </footer>
	                        </article>
	                    </div>

 			<?php endwhile; ?>
 			
 			<?php endif;
		die();
	endif;  ?>

<?php get_header(); ?>

<?php wp_reset_postdata(); ?>

<?php $featuredImageType = get_field('background_image_type'); ?>
<?php setBgImg();  ?>

<main class="content1 hasFilter roomsPage <?php echo $featuredImageType;?>">
	
		<section class="pageImage">
			<?php putRevSlider("Commonpage","563") ?>
		</section>
	
        
    </main>
    <div style="clear:both"></div>
<div class="container">
            <div class="row">
                <section class="pageTitle text-center">
                	<div class="um_helper">
                		<div class="um_middle">
                			<h3 class="title pageTitle titleUp"><?php the_title(); ?></h3>
                		</div>
                	</div>        
                    
                    
                    
                    
		<div class="container">
            <div class="row">	<div class="boxgrid captionfull">
				<img src="http://mogulsl.com/wordpress/Acasia/wp-content/uploads/2015/03/offer1.jpg"/>
				<div class="cover boxcaption">
					<h3>Jarek Kubicki</h3>
					<p>Artist<br/><a href="http://www.nonsensesociety.com/2009/03/art-by-jarek-kubicki/" target="_BLANK">More Work <?php AnythingPopup('3'); ?>	</a></p>
				</div>		
			</div>
            <div class="boxgrid captionfull">
				<img src="http://mogulsl.com/wordpress/Acasia/wp-content/uploads/2015/03/offer1.jpg"/>
				<div class="cover boxcaption">
					<h3>Jarek Kubicki</h3>
					<p>Artist<br/><a href="http://www.nonsensesociety.com/2009/03/art-by-jarek-kubicki/" target="_BLANK">More Work <?php AnythingPopup('3'); ?>	</a></p>
				</div>		
			</div>
			<div class="boxgrid slideright">
				<img class="cover" src="http://mogulsl.com/wordpress/Acasia/wp-content/uploads/2015/03/offer1.jpg"/>
				<h3>Martin Stranka</h3>
				<p>Photographer<br/><a href="http://www.nonsensesociety.com/2009/03/photography-by-martin-stranka/" target="_BLANK">More Work <?php AnythingPopup('4'); ?>	</a></p>
			</div>
			<div class="boxgrid caption">
				<img src="http://mogulsl.com/wordpress/Acasia/wp-content/uploads/2015/03/offer1.jpg"/>
				<div class="cover boxcaption">
					<h3>Kamil Smala</h3>
					<p>Artist<br/><a href="http://www.nonsensesociety.com/2009/03/the-art-of-kamil-smala/" target="_BLANK">More Work</a></p>
				</div>
			</div>
            </div></div>
				
                    <section id="portfolio" class="margin-top50">
        <div class="container">
            <div class="row">
                
                <?php /*?> <?php $id=498; $post = get_page($id); echo $post->post_content;  ?><?php */?>
               <section>
				<ul id="da-thumbs" class="da-thumbs">
					<li>
						 <a href="#inline-1" rel="prettyPhoto" ><img src="http://mogulsl.com/wordpress/Acasia/wp-content/uploads/2015/03/offer1.jpg" alt="" width="50" />
							<div><span>Menu by Simon Jensen</span></div></a>
                           
	<div id="inline-1" class="hide">
			
					</li>
                  
                    
					<li>
						<a href="http://dribbble.com/shots/504336-TN-Aquarium">
								<img src="http://mogulsl.com/wordpress/Acasia/wp-content/uploads/2015/03/offer1.jpg"/>
							<div><span>Menu by Simon Jensen</span> </div>
						</a>
					</li>
					<li>
						<a href="http://dribbble.com/shots/504197-Mr-Crabs">
								<img src="http://mogulsl.com/wordpress/Acasia/wp-content/uploads/2015/03/offer1.jpg"/>
							<div><span>Mr. Crabs by John Generalov</span></div>
						</a>
					</li>
					<li>
						<a href="http://dribbble.com/shots/503731-Gallery-of-Mo-2-Mo-logo">
								<img src="http://mogulsl.com/wordpress/Acasia/wp-content/uploads/2015/03/offer1.jpg"/>
							<div><span>Gallery of Mo 2.Mo logo by Adam Campion</span></div>
						</a>
					</li>
					<li>	
						<a href="http://dribbble.com/shots/503058-Ice-Cream-nom-nom">
									<img src="http://mogulsl.com/wordpress/Acasia/wp-content/uploads/2015/03/offer1.jpg"/>
							<div><span>Ice Cream - nom nom by Eight Hour Day</span></div>
						</a>
					</li>
					<li>
						<a href="http://dribbble.com/shots/502927-My-Muse">
								<img src="http://mogulsl.com/wordpress/Acasia/wp-content/uploads/2015/03/offer1.jpg"/>
							<div><span>My Muse by Zachary Horst</span></div>
						</a>
					</li>
					<li>
						<a href="http://dribbble.com/shots/502538-Natalie-Justin-Cleaning">
								<img src="http://mogulsl.com/wordpress/Acasia/wp-content/uploads/2015/03/offer1.jpg"/>
							<div><span>Natalie & Justin Cleaning by Justin Younger</span></div>
						</a>
					</li>
					</ul>
			</section>

           
                  
            </div>
        </div>
    </section><!--/#portfolio-item--> 
       
          
                </section>
                
			<?php /*?>	<?php get_template_part('content','filters'); ?><?php */?>
                   
	        </div>
            <!--row-->
          
			
        </div>
        
<?php /*?>        
<script>
		var pageRooms = parseInt("<?php echo $paged; ?>");
    	var lastPageRooms = parseInt('<?php echo $the_Query->max_num_pages; ?>');
    	var postId = "<?php echo $post->ID; ?>";	
	
</script><?php */?>
<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.1.js"></script>
		<script type="text/javascript">
			$(document).ready(function(){
				//To switch directions up/down and left/right just place a "-" in front of the top/left attribute
				//Vertical Sliding
				$('.boxgrid.slidedown').hover(function(){
					$(".cover", this).stop().animate({top:'-260px'},{queue:false,duration:300});
				}, function() {
					$(".cover", this).stop().animate({top:'0px'},{queue:false,duration:300});
				});
				//Horizontal Sliding
				$('.boxgrid.slideright').hover(function(){
					$(".cover", this).stop().animate({left:'325px'},{queue:false,duration:300});
				}, function() {
					$(".cover", this).stop().animate({left:'0px'},{queue:false,duration:300});
				});
				//Diagnal Sliding
				$('.boxgrid.thecombo').hover(function(){
					$(".cover", this).stop().animate({top:'260px', left:'325px'},{queue:false,duration:300});
				}, function() {
					$(".cover", this).stop().animate({top:'0px', left:'0px'},{queue:false,duration:300});
				});
				//Partial Sliding (Only show some of background)
				$('.boxgrid.peek').hover(function(){
					$(".cover", this).stop().animate({top:'90px'},{queue:false,duration:160});
				}, function() {
					$(".cover", this).stop().animate({top:'0px'},{queue:false,duration:160});
				});
				//Full Caption Sliding (Hidden to Visible)
				$('.boxgrid.captionfull').hover(function(){
					$(".cover", this).stop().animate({top:'160px'},{queue:false,duration:160});
				}, function() {
					$(".cover", this).stop().animate({top:'260px'},{queue:false,duration:160});
				});
				//Caption Sliding (Partially Hidden to Visible)
				$('.boxgrid.caption').hover(function(){
					$(".cover", this).stop().animate({top:'160px'},{queue:false,duration:160});
				}, function() {
					$(".cover", this).stop().animate({top:'220px'},{queue:false,duration:160});
				});
			});
		</script>
        

    <?php get_footer(); ?>