/*
	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,
		onBeforeShow: function(){ 
			
			$(this).prev().animate({opacity:'show'},300);
			$(this).addClass('open');
			
			
		},
		onHide: function(){ 

			if($(this).hasClass('open')){
				$(this).removeClass('open');
				arrow = null;
			}

		}
	});	
	
	
	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($('ul.sf-menu'));
}

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