<footer class="main-footer printHide">
	<div class="pull-right hidden-xs">
			<b>Version</b> 1.0.0
	</div>
	<strong>Powered by &copy; 2017 <a href="http://www.salihin.com.my" target="blank"><img src="<?php echo base_url() ?>img/logos/salihin.png" width="70px" style="padding-bottom:8px"/></a>.</strong> All rights reserved.
</footer>
</div>

<div class="overlay"><div class="overlay-loader"><img src="<?php echo base_url(); ?>dist/img/_sys/loader.gif" /></div></div>



<!---------------------------------------------------------------------------------------------------------
SCRIPTS
----------------------------------------------------------------------------------------------------------->
<script src="<?php echo base_url(); ?>dist/js/bootstrap/bootstrap.min.js"></script>
<script src="<?php echo base_url(); ?>dist/js/bootstrap/vendor/holder.min.js"></script>
<script src="<?php echo base_url(); ?>dist/js/bootstrap/ie10-viewport-bug-workaround.js"></script>
<script src="<?php echo base_url(); ?>dist/js/app.js"></script>
<script src="<?php echo base_url(); ?>dist/js/main.js"></script>
<script src="<?php echo base_url(); ?>dist/vendors/WOW/dist/wow.min.js"></script>

<!-- CHARTING -->
<script src="<?php echo base_url(); ?>dist/vendors/raphael/raphael.js"></script>
<script src="<?php echo base_url(); ?>dist/vendors/mapael/jquery.mapael.js"></script>
<script src="<?php echo base_url(); ?>dist/vendors/mapael/malaysia.js"></script>
<script src="<?php echo base_url(); ?>dist/vendors/chartjs/Chart.min.js"></script>

<!-- DATE PICKER -->
<link rel="stylesheet" href="<?php echo base_url(); ?>dist/vendors/datepicker/bootstrap-datetimepicker.css">
<script src="<?php echo base_url(); ?>dist/vendors/daterangepicker/moment.min.js"></script>
<script src="<?php echo base_url(); ?>dist/vendors/datepicker/transition.js"></script>
<script src="<?php echo base_url(); ?>dist/vendors/datepicker/collapse.js"></script>
<script src="<?php echo base_url(); ?>dist/vendors/datepicker/bootstrap-datetimepicker.js"></script>

<!-- DROPZONE -->
<link rel="stylesheet" href="<?php echo base_url(); ?>dist/vendors/dropzone-js/dropzone.css">
<script src="<?php echo base_url(); ?>dist/vendors/dropzone-js/dropzone.js"></script>

<!-- VALIDATION ENGINE -->
<script src="<?php echo base_url(); ?>dist/vendors/validationengine/jquery.validationEngine.js"></script>
<script src="<?php echo base_url(); ?>dist/vendors/validationengine/languages/jquery.validationEngine-en.js"></script>

<!-- DATATABLES -->
<link rel="stylesheet" href="<?php echo base_url(); ?>dist/vendors/datatables/dataTables.bootstrap.css">
<script src="<?php echo base_url(); ?>dist/vendors/datatables/jquery.dataTables.min.js"></script>
<script src="<?php echo base_url(); ?>dist/vendors/datatables/dataTables.bootstrap.min.js"></script>

<!-- SELECT2 -->
<link rel="stylesheet" href="<?php echo base_url(); ?>dist/vendors/select2/dist/css/select2.css">
<script src="<?php echo base_url(); ?>dist/vendors/select2/dist/js/select2.js"></script>

<!-- VALIDATION ENGINE -->
<script src="<?php echo base_url(); ?>dist/vendors/validationengine/jquery.validationEngine.js"></script>
<script src="<?php echo base_url(); ?>dist/vendors/validationengine/languages/jquery.validationEngine-en.js"></script>

<!-- PNOTIFY -->
<link rel="stylesheet" href="<?php echo base_url(); ?>dist/vendors/pnotify/css/pnotify.buttons.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>dist/vendors/pnotify/css/jquery.pnotify.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>dist/vendors/pnotify/css/pnotify.custom.css">
<script src="<?php echo base_url(); ?>dist/vendors/pnotify/js/jquery.pnotify.min.js"></script>
<script src="<?php echo base_url(); ?>dist/vendors/pnotify/js/pnotify.buttons.js"></script>

<script>
$(function() {	
	PNotify.prototype.options.delay = 3000;
	
	$(window).scroll(function() {
		if($(window).scrollTop() > $(window).height()/3) {
			$('#gototop').fadeIn();
		} else {
			$('#gototop').fadeOut();
		}
	});
	
	$('.datepick').datetimepicker({ format: 'DD-MM-YYYY hh:mm a' });
	
	$('#closeAlert').off('click').on('click',hideAlert);
	$('#alert').off('click').on('click',hideAlert);
	
	$('.flash-data').off('click').on('click',function() { $(this).remove(); }).slideDown(function() {
		setTimeout(function() {
			$('.flash-data').slideUp(function() {
				$(this).remove();
			});
		},5000);
	});
	
	$('.modal').on('shown.bs.modal', function() {
		$("html").css('overflow-y','hidden');
	});
	
	$('.modal').on('hidden.bs.modal', function() {
		$("html").css('overflow-y','auto');
	});
	
	$('.form-group input, .form-group textarea, .form-group select').off('click').on('click', function() {
		$(this).parents('.form-group').eq(0).removeClass('has-error');
	});
});

function goto(id) {
	if(id == 0) {
		var t = 0;
	} else {
		if(	$(id).length ) {
			var $item = $(id);
			if (!$item.length) return;		
			var t = $item.position().top;
		} else {
			window.location.href = '<?php echo base_url(); ?>'+id;
		}
	}
	$('html,body').animate({scrollTop:t}, 'slow');
	
	if(t == 0) {
		$('#gototop').fadeOut();
	} else {
		$('#gototop').fadeIn();
	}
}

function LoadingOpen() {
	new PNotify({
		title: "Please wait...",
		type: 'info',
		icon: 'fa fa-spinner fa-spin',
		animate: {
			animate: true,
			in_class: 'flipInX',
			out_class: 'flipOutX'
		}
	});
}	

function LoadingClose() {
	PNotify.removeAll();
}

function showAlert(msg) {
	$('#alert').find('span').html(msg);
	$('#alert').removeClass('hidden');
	$('#alert').show();
}

function hideAlert() {
	$('#alert').hide();
	$('#alert').addClass('hidden');
	$('#alert').find('span').html('');
	
	$('.form-group').removeClass('has-error');
}

function openLoader() {
	$('.overlay').show();
	$('.overlay-loader').show();
}

function closeLoader() {
	$('.overlay').hide();
	$('.overlay-loader').hide();
}
</script>
</body>
</html>
