var feedAge = new Class({
	Implements: Options,
	options:  {
		id: 'flash_container_age',
		width: 458,
		height: 309,
		flash_container: 'container_flash_age',
		file:''
	},
	//Function run when class is created
	initialize : function(options){

		this.setOptions(options);
		this.container = document.id(document.body);
			//
			$("bt_no").addEvent('click', function(event){
				event.stop();
				this.embedVideo();
				/* usage */
				var olay = new Overlay(document.body, { 
					duration: 400,
					onClick: function() {
						$('overlay').dispose();
						$(this.options.id).dispose();
					}.bind(this)
				});
				olay.open();
			}.bind(this));
	},
	embedVideo : function(){
		// Contenitore
	this.flash_container = new Element('div',{
			'id': this.options.id			
		}).inject(this.container);
		
		//Contenitore Flash
		this.container_flash = new Element('div',{
			'id': this.options.flash_container
		}).inject(this.flash_container);
		
		
		this.container_flash.addEvent('click', function(e){
			e.stop();
			$('overlay').dispose();
			$(this.options.id).dispose();
		}.bind(this));
		
		this.flash_container.addEvent('click', function(e){
			e.stop();
			$('overlay').dispose();
			$(this.options.id).dispose();
		}.bind(this));
		
		
		
		this.container_flash.setStyles({
		    'width': this.options.width, 
		    'height': this.options.height
		});
		//Embedda video
		var flashvars = {}
		var params = {
			'allowfullscreen': "true",
			'allownetworking': "all",
			'allowscriptaccess': "always",
		  'wmode': "transparent"
		}               
		var attributes = {}
		swfobject.embedSWF(this.options.file, this.options.flash_container, this.options.width, this.options.height, "8.0.0", false, flashvars, params, attributes);
	}
});
