window.addEvent('domready', function() {
	
	/* ----------Config Vars----------- */
	var transitionTime = 2000; 		//transition time (1 second = 1000)
	var main = $('main');  		//'base' box
	var tag = $('tagline');  	//image holding box
	var cred = $('credit');  		//logo box
	
	
	//initialize 
	main.setStyle('opacity', "0");
	tag.setStyle('opacity', "0");
	cred.setStyle('opacity', "0");
	
	
	//fade in
	var showBox = function(el, time){ 
		
		//get item to slide out
		var curItem = el;	
		var curTime = time;	
		
		//set up our animation stylings for out and in motions (note:  Fx.Styles does NOT exist in moo 1.2, so we must use Fx.Morph or Fx.Tween)
		var fade_in = new Fx.Morph(el, {
			     duration: curTime, 
			     transition: 'quad:out', 
			     link: 'ignore'
		});
		
		//we will set a beginning value here
		//this is so that it gives the illusion of continuous motion from one direction, even after the first cycle of items
		fade_in.start({
		'opacity': 1
		});
		
	};
	//--------------- end showBox ---------------------
	
	
	
	var theLink = main.getElement('a').getAttribute('href');
	var gotoPage = function(myLink){
		location.href = myLink;	
	}
	
	
	
	//fade in w/ staggered delays
	showBox.delay(20, null, [main, 2000]);
	showBox.delay(550,null, [tag, 2000]);
	showBox.delay(2000,null, [cred, 3000]);
	gotoPage.delay(8500,null,theLink);
		
	

	
});
