﻿/*
--------------------------------------------------------------------------------
 Holder for Misc $ Functions
--------------------------------------------------------------------------------
*/
function iif( b, v1, v2 )
{
	if(b)
		return v1;
	else
		return v2;	
}

var ajCalWidth = 323;
var ajCalOwner = '%2fcals%2fdefault%2easp';

function loadCal( date )
{
	jQuery('#aj-calloader').removeClass("hide");
	jQuery('#aj-calwrapper').fadeOut('fast').load('custom/0000/aja/calendar/smallcalendar.asp', {smalldate: date, width: ajCalWidth, owner: ajCalOwner }, function(){
		jQuery('#aj-calloader').addClass("hide");
		jQuery('#aj-calwrapper').fadeIn('fast');
	});	
}

// init Homepage
function initHomepage( date, width, owner )
{
	if( width )	ajCalWidth = width;
	if( owner ) ajCalOwner = owner;
	loadCal( date );
	
//	if($.support.opacity) // not i.e. currently
//		$('#content div.overlay').fadeIn(1500);
//	else
//		$('#content div.overlay').show();
}
