window.addEvent('domready',function(){
	new FF_Intro();
})
var FF_Intro=new Class({
	Implements:[Options],
	options:{
		eff_1:null,
		eff_2:null
	},
	initialize:function(opts)
	{
		this.setOptions(opts);
		//console.log('Intro...');
		//this.options.light=$$('.intro')[0].setStyle('opacity',0).show();
		//this.options.enter=$$('.intro')[1].setStyle('opacity',0).show();
		$$('.loader')[0].hide();
		this.options.eff_1=this.addEffect($$('.intro')[0].setStyle('opacity',0).show(),{duration:2000});
		this.options.eff_2=this.addEffect($$('.intro')[1].setStyle('opacity',0).show());
		this.options.eff_3=this.addEffect($$('.languages')[0].setStyle('opacity',0).show(),{duration:600});
		this.options.endWidth=$$('.languages')[0].getDimensions().width;
		this.enter();
		this.light();
		//this.enter.delay(800,this);
		this.languages.delay(2000,this);
		var sf=function(){window.fireEvent("show:footer");}.delay(2000,this);
		this.showBanner.delay(500,this);
	}
});
FF_Intro.prototype.showBanner=function()
{
	var ele=$$('.first')[0];
	var vsrc="swf/BannerSito.swf";
	new VideoQuickLook(vsrc,ele,{width: 600,height:400,_bgOpacity:0.9,_qlbgColor:'#000',additionalCSS:'black'});
	return;
};
FF_Intro.prototype.light=function()
{
	this.options.eff_1.start({'opacity':1});
};
FF_Intro.prototype.enter=function()
{
	this.options.eff_2.start({'opacity':1});
};
FF_Intro.prototype.languages=function()
{
	this.options.eff_3.start({'opacity':[0,1], 'width':[0,this.options.endWidth]});
};
FF_Intro.prototype.addEffect=function(ele,obj)
{
	if(obj)
	{
		return new Fx.Morph(ele, obj);	
	}
	else
	{
		return new Fx.Morph(ele, {
			duration: 1000
		});	
	}
};
