<!-- inline scripts related to this page -->
		<script src="<?php echo base_url().'assets_v2/js/bootstrap-multiselect.min.js';?>"></script>
		<script src="<?php echo base_url().'assets_v2/js/select2.min.js';?>"></script>			
			<script src="<?php echo base_url().'assets_v2/js/bootstrap-timepicker.min.js';?>"></script>
<!-- basic scripts -->
		<!--[if !IE]> -->
		<script src="<?php echo base_url().'assets_v2/js/jquery-2.1.4.min.js';?>"></script>
		<!-- <![endif]-->
		<!--[if IE]>
		<script src="assets/js/jquery-1.11.3.min.js"></script>
		<![endif]-->
		<script type="text/javascript">
			if('ontouchstart' in document.documentElement) document.write("<script src='assets/js/jquery.mobile.custom.min.js'>"+"<"+"/script>");
		</script>
		<script src="<?php echo base_url().'assets_v2/js/bootstrap.min.js';?>"></script>
		<!-- page specific plugin scripts -->
		<script src="<?php echo base_url().'assets_v2/js/jquery.bootstrap-duallistbox.min.js';?>"></script>
		<script src="<?php echo base_url().'assets_v2/js/jquery.raty.min.js';?>"></script>
		<script src="<?php echo base_url().'assets_v2/js/bootstrap-multiselect.min.js';?>"></script>
		<script src="<?php echo base_url().'assets_v2/js/select2.min.js';?>"></script>
		<script src="<?php echo base_url().'assets_v2/js/jquery-typeahead.js';?>"></script>

		<!-- ace scripts -->
		<script src="<?php echo base_url().'assets_v2/js/ace-elements.min.js';?>"></script>
		<script src="<?php echo base_url().'assets_v2/js/ace.min.js';?>"></script>
		<!-- inline scripts related to this page -->
		<script src="<?php echo base_url().'assets_v2/js/bootstrap-datepicker.min.js';?>"></script>
		<script src="<?php echo base_url().'assets_v2/js/bootstrap-timepicker.min.js';?>"></script>
		<script src="<?php echo base_url().'assets_v2/js/moment.min.js';?>"></script>
		<script src="<?php echo base_url().'assets_v2/js/daterangepicker.min.js';?>"></script>
		<script src="<?php echo base_url().'assets_v2/js/bootstrap-datetimepicker.min.js';?>"></script>
		<script src="<?php echo base_url().'assets_v2/js/bootstrap-colorpicker.min.js';?>"></script>		
		<script type="text/javascript">
			jQuery(function($){
			    var demo1 = $('select[name="duallistbox_demo1[]"]').bootstrapDualListbox({infoTextFiltered: '<span class="label label-purple label-lg">Filtered</span>'});
				var container1 = demo1.bootstrapDualListbox('getContainer');
				container1.find('.btn').addClass('btn-white btn-info btn-bold');
			
				/**var setRatingColors = function() {
					$(this).find('.star-on-png,.star-half-png').addClass('orange2').removeClass('grey');
					$(this).find('.star-off-png').removeClass('orange2').addClass('grey');
				}*/
				$('.rating').raty({
					'cancel' : true,
					'half': true,
					'starType' : 'i'
					/**,
					
					'click': function() {
						setRatingColors.call(this);
					},
					'mouseover': function() {
						setRatingColors.call(this);
					},
					'mouseout': function() {
						setRatingColors.call(this);
					}*/
				})//.find('i:not(.star-raty)').addClass('grey');
				
				
				
				//////////////////
				//select2
				$('.select2').css('width','200px').select2({allowClear:true})
				$('#select2-multiple-style .btn').on('click', function(e){
					var target = $(this).find('input[type=radio]');
					var which = parseInt(target.val());
					if(which == 2) $('.select2').addClass('tag-input-style');
					 else $('.select2').removeClass('tag-input-style');
				});
				
				//////////////////
				$('.multiselect').multiselect({
				 enableFiltering: true,
				 enableHTML: true,
				 buttonClass: 'btn btn-white btn-primary',
				 templates: {
					button: '<button type="button" class="multiselect dropdown-toggle" data-toggle="dropdown"><span class="multiselect-selected-text"></span> &nbsp;<b class="fa fa-caret-down"></b></button>',
					ul: '<ul class="multiselect-container dropdown-menu"></ul>',
					filter: '<li class="multiselect-item filter"><div class="input-group"><span class="input-group-addon"><i class="fa fa-search"></i></span><input class="form-control multiselect-search" type="text"></div></li>',
					filterClearBtn: '<span class="input-group-btn"><button class="btn btn-default btn-white btn-grey multiselect-clear-filter" type="button"><i class="fa fa-times-circle red2"></i></button></span>',
					li: '<li><a tabindex="0"><label></label></a></li>',
			        divider: '<li class="multiselect-item divider"></li>',
			        liGroup: '<li class="multiselect-item multiselect-group"><label></label></li>'
				 }
				});
			
				
				///////////////////
					
				//typeahead.js
				//example taken from plugin's page at: https://twitter.github.io/typeahead.js/examples/
				var substringMatcher = function(strs) {
					return function findMatches(q, cb) {
						var matches, substringRegex;
					 
						// an array that will be populated with substring matches
						matches = [];
					 
						// regex used to determine if a string contains the substring `q`
						substrRegex = new RegExp(q, 'i');
					 
						// iterate through the pool of strings and for any string that
						// contains the substring `q`, add it to the `matches` array
						$.each(strs, function(i, str) {
							if (substrRegex.test(str)) {
								// the typeahead jQuery plugin expects suggestions to a
								// JavaScript object, refer to typeahead docs for more info
								matches.push({ value: str });
							}
						});
			
						cb(matches);
					}
				 }
			
				 $('input.typeahead').typeahead({
					hint: true,
					highlight: true,
					minLength: 1
				 }, {
					name: 'states',
					displayKey: 'value',
					source: substringMatcher(ace.vars['US_STATES']),
					limit: 10
				 });
					
				//in ajax mode, remove remaining elements before leaving page
				$(document).one('ajaxloadstart.page', function(e) {
					$('[class*=select2]').remove();
					$('select[name="duallistbox_demo1[]"]').bootstrapDualListbox('destroy');
					$('.rating').raty('destroy');
					$('.multiselect').multiselect('destroy');
				});
			
			});
		</script>

<script type="text/javascript">
				jQuery(function($) {
					$('.date-picker').datepicker({
						autoclose: true,
						todayHighlight: true
					})
					//show datepicker when clicking on the icon
					.next().on(ace.click_event, function(){
						$(this).prev().focus();
					});
				});
					$('#timepicker1').timepicker({
						minuteStep: 1,
						showSeconds: false,
						showMeridian: false,
						disableFocus: true,
						icons: {
							up: 'fa fa-chevron-up',
							down: 'fa fa-chevron-down'
						}
					}).on('focus', function() {
						$('#timepicker1').timepicker('showWidget');
					}).next().on(ace.click_event, function(){
						$(this).prev().focus();
					});

					$('#timepicker2').timepicker({
						minuteStep: 1,
						showSeconds: false,
						showMeridian: false,
						disableFocus: true,
						icons: {
							up: 'fa fa-chevron-up',
							down: 'fa fa-chevron-down'
						}
					}).on('focus', function() {
						$('#timepicker2').timepicker('showWidget');
					}).next().on(ace.click_event, function(){
						$(this).prev().focus();
					});

			$(document).on('click', '.number-spinner button', function () {    
				var btn = $(this),
					oldValue = btn.closest('.number-spinner').find('input').val().trim(),
					newVal = 0;
				
				if (btn.attr('data-dir') == 'up') {
					newVal = parseInt(oldValue) + 1;
				} else {
					if (oldValue > 1) {
						newVal = parseInt(oldValue) - 1;
					} else {
						newVal = 1;
					}
				}
				btn.closest('.number-spinner').find('input').val(newVal);
			});

			//tampil layanan
			$('#myModal1').modal('show');
			//tampil item
			$('#myModal2').modal('show');
			</script>

			<script type="text/javascript" src="assets/jam/dist/bootstrap-clockpicker.min.js"></script>
			<script type="text/javascript">
			$('.clockpicker').clockpicker()
				.find('input').change(function(){
					console.log(this.value);
				});
			var input = $('#single-input').clockpicker({
				placement: 'bottom',
				align: 'left',
				autoclose: true,
				'default': 'now'
			});

			// Manually toggle to the minutes view
			$('#check-minutes').click(function(e){
				// Have to stop propagation here
				e.stopPropagation();
				input.clockpicker('show')
						.clockpicker('toggleView', 'minutes');
			});
			if (/mobile/i.test(navigator.userAgent)) {
				$('input').prop('readOnly', true);
			}
			</script>
			<script type="text/javascript">
			hljs.configure({tabReplace: '    '});
			hljs.initHighlightingOnLoad();
			</script>