/* SunSolutions
	(c) 2006-2008 Omines - www.omines.com
	
	All rights explicitly reserved - unauthorized reproduction strictly prohibited
*/

// Site class - main active content wrapper
var Site = {
	start: function()
	{
		new SmoothScroll({duration:300, transition:Fx.Transitions.Expo.easeOut});
		if($('splash'))
			this.initSplash();
		if($('to-img'))
			this.initCrossFade();
	},
	initSplash: function()
	{
		this.fadeOut = $('splash').effects({duration:1000, transition: Fx.Transitions.Sine.easeOut});
		this.fadeOut.start.delay(1500, this.fadeOut, {'opacity':[1,0]});
		this.redirect.delay(2500);
	},
	initCrossFade: function()
	{
		this.cross = $('from-img').effects({duration:4000, fps:60, transition: Fx.Transitions.Sine.easeOut});
		this.cross.start.delay(2000, this.cross, {'opacity':[1,0]});		
	},
	redirect: function()
	{
		window.location = 'home';	
	}
};

// Set event to start running active content when DOM is loaded
window.addEvent('domready', function() { Site.start(); });
