window.addEvent('domready',function()
	{
	// remplacement des target='_blank' par la class='newwindow'
	var newwindowslinks = $$('.newwindow');
	newwindowslinks.each(function(el) 
		{
		el.addEvent('click', function (e) 
			{
			new Event(e).stop(); 
			// alert('Vous vous dirigez vers : '+this.title+'\r\n'+this.href);
			window.open(this.href);
			return false;
			});
		});
		
		
		
	
	window.addEvent('domready',function()
		{	
		var videoswitchs = $$('.videoswitch');	
		videoswitchs.each(function(el)
			{		
			var relid = el.get('rel');		
			el.addEvent('click',function()
				{			
				var contvid = el.getNext('.videocontainer');
				var myHTMLRequest = new Request.HTML({
							url:'/ajax/getvideo.php',
							 onSuccess: function(){
								el.dispose();
								el.removeEvents();
								},

							update:contvid
							}).get({'idactuvideo':relid});
				});
			});
		});	
		
	});
	
