    </div>
    <!-- page body end -->
	<?php if($this->hs->getwebsettings('copyright_show') == 1){ ?>
    <div class="hs_footer">
        <p class='hs_copyright'>Copyright &copy; 2019 <a href='<?php echo base_url().'admin/dashboard'; ?>'> <?php if($this->hs->getwebsettings('sitetitle_show') == 1){ echo $this->hs->getwebsettings('sitetitle_text'); } ?></a>.  <?php echo $this->hs->getwebsettings('copyright_foot'); ?></a></p>
    </div>
</div>
	<?php } ?>
<!-- page end -->

<!-- library javascript start -->
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/lib/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/lib/bootstrap.min.js"></script>
<!-- library javascript end -->

<!-- plugin javascript start -->
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/plugins/scrollbar.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/plugins/datatables.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/plugins/select2.min.js"></script>

<!-- plugin javascript end -->
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/main.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/ckeditor/ckeditor.js"></script>
 
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/admincustom.js"></script>
<?php if(isset($active_map) && ($active_map ==1)){ ?> 
<script>
function initMap() {
    var map = new google.maps.Map(document.getElementById('dvMap'), {
      center: {lat: <?php echo $this->hs->getwebsettings('map_latitude'); ?>, lng: <?php echo $this->hs->getwebsettings('map_longitude'); ?>},
      zoom: 13
	});
      
	var input = document.getElementById('map_address');
    //map.controls[google.maps.ControlPosition.TOP_LEFT].push(input);

    var autocomplete = new google.maps.places.Autocomplete(input);
    autocomplete.bindTo('bounds', map);
	
	 
	var infowindow = new google.maps.InfoWindow();
    var marker = new google.maps.Marker({
        map: map,
        anchorPoint: new google.maps.Point(0, -29)
    });      
	
	autocomplete.addListener('place_changed', function() {
        infowindow.close();
        marker.setVisible(false);
        var place = autocomplete.getPlace();
        if (!place.geometry) {
            window.alert("Autocomplete's returned place contains no geometry");
            return;
        }
	
		if (place.geometry.viewport) {
            map.fitBounds(place.geometry.viewport);
        } else {
            map.setCenter(place.geometry.location);
            map.setZoom(17);
        }
        marker.setIcon(({
            url: place.icon,
            size: new google.maps.Size(71, 71),
            origin: new google.maps.Point(0, 0),
            anchor: new google.maps.Point(17, 34),
            scaledSize: new google.maps.Size(35, 35)
        }));     
        marker.setPosition(place.geometry.location);
        marker.setVisible(true);
    
	
		var address = '';
        if (place.address_components) {
            address = [
              (place.address_components[0] && place.address_components[0].short_name || ''),
              (place.address_components[1] && place.address_components[1].short_name || ''),
              (place.address_components[2] && place.address_components[2].short_name || '')
            ].join(' ');
        }
    
        infowindow.setContent('<div><strong>' + place.name + '</strong><br>' + address +'</div>');
        infowindow.open(map, marker);  
      
        //Location details
        $('#map_address').val(place.formatted_address);
        $('#latitude').val(place.geometry.location.lat());
        $('#longitude').val(place.geometry.location.lng()); 
		 
    });  
} 
</script>
<script src="https://maps.googleapis.com/maps/api/js?key=<?php echo $this->hs->getwebsettings('map_apikey'); ?>&libraries=places&callback=initMap" async defer></script>
<?php } ?>
</body>
</html>