/**
 * @author Abdellah
 */
function abSwiff() {
	//on crée les liens qui vont déclencher les videos
	var triggers = new Hash({'adouane': 'Malik Adouane', 'morituri': 'Morituri'});
	triggers.each(function (text, movie){
		new Element('a', {
			'id' : 'goTo-' + movie,
			'href': '#',
			'html': 'Cliquez ici pour découvrir la pub tv de ' + text,
			'styles': {
				'display':'block',
				'background': 'transparent url(/images/commun/bullet.gif) no-repeat scroll 0 3px',
				'margin': '0 0 5px ',
				'padding': '0 0 0 15px',
				'width': '216px',
				'color': '#4D4D4D'
			},
		    'events': {
		        'click': function(e){
					e.stop();
					//si un element flash est déjà présent, le détruire
					if($type($('abSwiffContainer')) == 'element'){
						$('abSwiffContainer').destroy();
					}
					//création d'un nouveau conteneur pour la movie
					myFlash = new Element('dd', {id: 'abSwiffContainer'}).inject('goTo-' + movie, 'after');
					var abFlash = new Swiff('/images/swf/video.swf', {
					    width: 231, height: 154, container: 'abSwiffContainer',
					    params: { wmode: 'transparent', bgcolor: '#ffffff' },
						vars: { awkomSrc: '/video.xml?movie=' + movie }
					});
					myFlash.set('style', 'border-top:1px solid #E1E0DE;');
		        }
		    }
		}).inject($('leftSide'));
	})
	
}
