var fmkcalendar = {
		calendarTypes: [],
		setCalendarTypes: function() {
			fmkcalendar.calendarTypes = [];
			var checkCnt = 0;
			$("#calendartypes").find('INPUT[@name="caltypes"][type="checkbox"]').each(function(){
				var v = $(this).val();
				if($(this).attr('checked')) {
					fmkcalendar.calendarTypes.push(v);
				}
			});
		},
		doCalType: function()
		{
			this.setCalendarTypes();
			$('#calendar').fullCalendar( 'rerenderEvents' );
		},
		dotip: function(f,event) {
			var t_title = event.title;
			var t_text = event.tip;
			f.qtip(
	   		{
	      		content: {
	         		title: {
	            		text: t_title,
	            		button: '[<b>X</b>]'
	         		},
	         		text: t_text
	      		},
	      		position: {
				      corner: {
				         target: 'topRight',
				         tooltip: 'bottomLeft'
				      }
	      		},
	      		show: {
	         		when: 'mouseover', // Show it on click
	         		solo: true // And hide all other tooltips
	      		},
	      		hide: false,
	      		style: 'mystyle',
	      		api: {
	         		beforeShow: function()
	         		{
	            		// Fade in the modal "blanket" using the defined show speed
	            		$('#qtip-blanket').fadeIn(this.options.show.effect.length);
	         		},
	         		beforeHide: function()
	         		{
	            		// Fade out the modal "blanket" using the defined hide speed
	            		$('#qtip-blanket').fadeOut(this.options.hide.effect.length);
	         		}
	      		}
	   		});
		}
};
