<?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'];
 
// MAP DEFAULTS
$defaults = $CORE->wlt_google_getdefaults(); 
  
// 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="row">

	<div class="col-md-8">
		
        
        <div id="car-slider" class="owl-carousel owl-theme">
         
         <?php if(strlen($HDATA['t3']['img1']) > 1){ ?>
         
         <div class="item"> <img src="<?php echo stripslashes($HDATA['t3']['img1']); ?>" alt="slide"></div>
         
         <?php } ?>
         
         <?php if(strlen($HDATA['t3']['img2']) > 1){ ?>
         
         <div class="item"> <img src="<?php echo stripslashes($HDATA['t3']['img2']); ?>" alt="slide"></div>
         
         <?php } ?>
         
         <?php if(strlen($HDATA['t3']['img3']) > 1){ ?>
         
         <div class="item"> <img src="<?php echo stripslashes($HDATA['t3']['img3']); ?>" alt="slide"></div>
         
         <?php } ?>
          
        </div> 
                 
        <script>
        jQuery(document).ready(function() {
        jQuery("#car-slider").owlCarousel({ 
              slideSpeed : 300,
              singleItem:true 
          }); 
        });
        </script>

	</div>
	 
	<div class="col-md-4">	
	
		<div class="bannerboxside">
		
			<div>
            <a href="<?php echo home_url(); ?>/?s=">
            <h1><?php echo stripslashes($HDATA['t1']['title1']); ?></h1>
            <p><?php echo stripslashes($HDATA['t1']['title2']); ?></p>            
            </a>
            
            </div>  
			 
			<div class="last alt2">
            <a href="<?php echo  $GLOBALS['CORE_THEME']['links']['add']; ?>">
            <h1><?php echo stripslashes($HDATA['t2']['title1']); ?></h1>
            <p><?php echo stripslashes($HDATA['t2']['title2']); ?></p>
            </a>
            </div>
			
		</div>	
		
	</div>
</div>

<?php echo do_shortcode('[CARTYPES]'); ?>
 

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

<div id="car1" class="owl-carousel wlt_search_results grid_style style1">
<?php echo do_shortcode('[LISTINGS dataonly=1 show=10]'); ?> 
</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="gmap500">
<?php echo $CORE->wlt_googlemap_html(true); ?>
</div>

<script> 
jQuery(document).ready(function() { 
	loadGoogleMapsApi(); 
});
var wlt_map_options = [{
	l: "<?php echo home_url(); ?>/",
	path: "<?php echo get_template_directory_uri(); ?>", 
	id: "wlt_google_map", 
	region: "<?php echo $defaults['region']; ?>", 
	lang: "<?php echo $defaults['lang'] ?>", 
	long: <?php echo $defaults['long']; ?>, 
	lat: <?php echo $defaults['lat']; ?>, 	
	zoom: <?php echo $defaults['zoom'] ?>,
	cluster: "<?php if(isset($GLOBALS['CORE_THEME']['googlemap_cluster']) && $GLOBALS['CORE_THEME']['googlemap_cluster'] == 1){ echo "yes"; }else{ echo "no"; } ?>",
	data: "",
	mapicon: "map-icon"
}];

</script>

<?php } ?>


<div class="block">

<div class="block-title"> <h3>Browse by Manufacturer </h3> </div>

<?php echo do_shortcode('[MAKERS]'); ?>

</div>


<?php } ?>

<?php } ?>
 
 

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