/*
	Quetools Renderer Custom Script
	For Quetools Renderer
	Copyright 2010 Decomplexity
*/

/*
	Executed on DOM Ready	
*/
var domLoaded = function(){

	// Autosizes the mainmenu items to fill their containing UL element.
	// A width must be set on the top level <ul> element of the menu
	//elastoNav('#dMenu ul');
	
	// Calendar Function
	highlightSelectedDay();
}


/*
	Executed on Window Load
*/
var contentLoaded = function(){

	//cleanup(); // Clear extra whitespace from content
	
	/*
		Set up Menus
	*/
	var arrow;
	var closeDelay = 400;
	
	$("ul.sf-menu").supersubs({ 
		minWidth:   12,
		maxWidth:   27,
		extraWidth: 1
	}).superfish({
		animation:  {opacity:'show',height:'show'},
		speed:		300,
		easing:		'swing',
		delay:		closeDelay
	});	
	
	
	hideOverlay();
	
	//$('#dScroller').nivoSlider();
	
	//$('.nivo-controlNav').css('width', $('.nivo-controlNav').width());
	
	// Autosizes the mainmenu items to fill their containing UL element
	// Run for a second time to check after images have loaded
	// A width must be set on the top level <ul> element of the menu
	elastoNav($('#dMenu ul'), true);

}

/*
	Tick Loading Animation
*/
var loadingTick = function(progress, canvas){
	
	// Draw loading animation here
	
}
