{% load bootstrap_calendar %}{% load static %}{% autoescape off %}{% minifyjs %}
<script>
(function($) {

    "use strict";
    var options = {
    events_source: '{{ events_url }}',
    view: '{{ view }}',
    language: '{{ language }}',
    tmpl_path: '{% get_static_prefix %}tmpls/',
    tmpl_cache: false,
    first_day: {{ first_day }},
       onAfterEventsLoad: function(events) {
	if(!events) {
		return;
        }
    },
	classes: {
		months: {
			general: 'label'
		}
	}
};

var	calendar = $('#calendar').calendar(options);
	$('.btn-group button[data-calendar-nav]').each(function() {
		var $this = $(this);
		$this.click(function() {
			calendar.navigate($this.data('calendar-nav'));
		});
	});

	$('.btn-group button[data-calendar-view]').each(function() {
		var $this = $(this);
		$this.click(function() {
			calendar.view($this.data('calendar-view'));
		});
	});
}(jQuery));
</script>
{% endminifyjs %}{% endautoescape %}
