var FullCalendar = new Class({
	
	Extends: Calendar,
	
	setUp: function()
	{
		this.baseUrl = document.controllerUrl;
		
		this.calendarGenerator	= new CalendarGenerator();
		this.scroller = new CalendarScroller($("wrapperCalendar"), this.calendarGenerator.container);
		this.calendarGenerator.addEvent("onDayGeneration", this.addElementToCollection.bind(this));
		this.dayCollection		= new DayCollection();
		this.searchBus = new SearchBus();
		this.searchBus.registerCallback(this.addDayClass.bind(this)		, "dayHover");
		this.searchBus.registerCallback(this.removeDayClass.bind(this)	, "dayOut");
		
		this.searchBus.registerCallback(this.rangeSelection.bind(this)	, "rangeSelection");
		
		this.selections			= new CalendarSelections(this.dayCollection);
		
		this.selections.addEvent("onDaySelectionHover"	, this.onSelectionHover.bind(this))
		this.selections.addEvent("onCreateRange"		, this.onRangeSelected.bind(this))
		this.selections.addEvent("onMouseEnter"			, this.dayCellMouseEnter.bind(this));
		this.selections.addEvent("onMouseLeave"			, this.dayCellMouseLeave.bind(this));
		this.selections.addEvent("onRangeSeted"			, this.onRangeSeted.bind(this));
		this.selections.addEvent("onInitSelection"		, this.onInitSelection.bind(this));
		
		document.addEvent("calendarEsc", this.unselectAll.bind(this));
		
	},
	
	initSelection: function(timestamp)
	{
		this.unselectAll();
		this.searchBus.trigger("onInitSelection", timestamp);
	},
	
	scrollToMonth: function(month)
	{
		this.scroller.scrollToElement(month);
	},
	
	/** Calendar GENERATION **/
	createCalendar: function(calendarObject)
	{
		this.parent(calendarObject);
		this.scroller.setMonths($H(this.calendarGenerator.months));
	}
	/*****/
});