<?php
/* 
* Theme: PREMIUMPRESS CORE FRAMEWORK FILE
* Url: www.premiumpress.com
* Author: Mark Fail
*
* THIS FILE WILL BE UPDATED WITH EVERY UPDATE
* IF YOU WANT TO MODIFY THIS FILE, CREATE A CHILD THEME
*
* http://codex.wordpress.org/Child_Themes
*/
if (!defined('THEME_VERSION')) {	header('HTTP/1.0 403 Forbidden'); exit; }

global $CORE;
 
// GET HOME PAGE CUSTOM DATA
$HDATA = $GLOBALS['CORE_THEME']['hdata'];

// HEADER
get_header($CORE->pageswitch()); 
 
?> 
<?php if(!isset($GLOBALS['CORE_THEME']['home_section1']) || (isset($GLOBALS['CORE_THEME']['home_section1']) && $GLOBALS['CORE_THEME']['home_section1'] == '1' ) ){  ?>

<?php if(isset($GLOBALS['CORE_THEME']['homesliderid']) && $GLOBALS['CORE_THEME']['homesliderid'] != "" && $GLOBALS['CORE_THEME']['homeslider'] == 1 ){  

echo do_shortcode(stripslashes("[rev_slider ".$GLOBALS['CORE_THEME']['homesliderid']."]")); 

}else{ ?>

<div class="jumbostyle2 cols<?php echo $GLOBALS['CORE_THEME']['layout_columns']['homepage']; ?>clearfix">
 
    <div class="jumbotron"><div class="gra">
    
    <div class="mainicon hidden-xs hidden-sm" <?php if(isset($HDATA['j1']['img2']) && $HDATA['j1']['img2'] != ""){ echo 'style="background-image: url(\''.$HDATA['j1']['img2'].'\');"'; } ?>></div>
    
    <div style='padding-left:15px;padding-right:15px;'>	
    		 
                <h1><?php echo stripslashes($HDATA['j1']['title1']); ?></h1>
                
                <h2><?php echo stripslashes($HDATA['j1']['title2']); ?></h2>
                
                <?php echo wpautop(stripslashes($HDATA['j1']['title3'])); ?> 
    </div>
    
    <div class='clearfix'></div>	
    <?php echo do_shortcode("[STORES limit=12 perrow=6 icon=yes]"); ?>
    
    </div> </div>

</div> 

<?php } ?>

<?php } ?>



<?php if(!isset($GLOBALS['CORE_THEME']['home_section2']) || (isset($GLOBALS['CORE_THEME']['home_section2']) && $GLOBALS['CORE_THEME']['home_section2'] == '1' ) ){  ?>

<div class="title1"><h2><?php echo stripslashes($HDATA['t1']['title1']); ?></h2></div>
    
<div id="car1" class="owl-carousel wlt_search_results grid_style style1">
<?php echo do_shortcode('[LISTINGS dataonly=1 show=8 custom="endsooncoupon" ]'); ?> 
</div>
<script>
jQuery(document).ready(function() { 
  jQuery("#car1").owlCarousel({ items : 4, autoPlay : true,  }); 
});
 </script>
 
<?php } ?>



			
<?php if(!isset($GLOBALS['CORE_THEME']['home_section3']) || (isset($GLOBALS['CORE_THEME']['home_section3']) && $GLOBALS['CORE_THEME']['home_section3'] == '1' ) ){  ?>

<div class='clearfix'></div>

<div class="row">

    <div class="<?php if($GLOBALS['CORE_THEME']['layout_columns']['homepage'] != 4){ ?> col-md-8<?php }else{ ?>col-md-12<?php } ?>">
    
    <div class="title1"><h2><?php echo $CORE->_e(array('homepage','14')); ?></h2></div>
    
    <?php $GLOBALS['cblock'] = "cc"; echo do_shortcode("[LISTINGS show=10 ]"); ?>
    
    </div>
    
    <?php if($GLOBALS['CORE_THEME']['layout_columns']['homepage'] != 4){ ?> 
    <div class="col-md-4">
    
	<?php hook_core_columns_right_top(); ?>
 
    <?php dynamic_sidebar('Right Column'); ?>
           
	<?php hook_core_columns_right_bottom(); ?>
     
    </div>
    <?php } ?>

</div>

<?php } ?> 


<?php get_footer($CORE->pageswitch()); ?>