(function ($) {

/**
 * Front_Datepicker
 * @constructor jQuery
 *
 */
$.widget('ui.Front_Schedule_General', $.extend({}, $.ui.Component.prototype, {
	type: 'Front_Schedule_General',
	_init: function () {
		$.ui.Component.prototype._init.call(this) // chain parent constructor

		var self = this;

		$("#f1_trigger").click(function (ev) {
			ev.preventDefault()
			var categories = {}
			$(".categories").each(function (){
				categories[$(this).attr("value")] = $(this).attr("checked")
			})
			categories.live = $("#is_live").attr("checked")
			categories.online = $("#is_online").attr("checked")
			categories.all = $("#is_all").attr("checked")
			self.reload(categories)
		})
	}
}));

}).require('Component')(jQuery);