$(document).ready(function($) {
	
	$('div.boxheb').mouseover(function() {
		
		var second_image = 'url(../images/H_bg_soustitre.gif)';
		$(this).css('background-image', second_image );
		$(this).css('background-position', '20px 0' );
		
	});  
	
	
	$('div.boxheb').mouseout(function() {
		$(this).css('background-image', 'none' );
	}); 
	
	$('h1.classh_b').mouseover(function() {
		$(this).css('color', '#33CC33');
		
	});  	
	
	$('h1.classh_b').mouseout(function() {
		$(this).css('color', '#707173');			
	}); 
	
	
	$('div.boxheb2').mouseover(function() {
		var second_image = 'url(../images/H_bg_soustitre.gif)';
		$(this).css('background-image', second_image );
		$(this).css('background-position', '30px 0' );
	});  
	$('div.boxheb2').mouseout(function() {
		$(this).css('background-image', 'none' );
	}); 
	

	
	$('ul#lnksurvol_nc li a').click(function() {
		$('div.contenu').css ({display: 'none'});
		$('ul#lnksurvol_nc li a').removeClass('active_survol_nc');
		myDiv = $(this).attr('rel');
		$('#'+myDiv).css ({display: 'block'});
		$(this).addClass('active_survol_nc');
		$(this).blur();
		return false;
	});
	
	  $('ul#lnksurvol_2p li a').click(function() {
		$('div.contenu1').css ({display: 'none'});
		$('ul#lnksurvol_2p li a').removeClass('active_survol_2p');
		myDiv = $(this).attr('rel');
		$('#'+myDiv).css ({display: 'block'});
		$(this).addClass('active_survol_2p');
		$(this).blur();
		return false;
	});
	
	$('ul#lnksurvol_2 li a').click(function() {
		$('div#slider_2 div').css ({display: 'none'});
		$('ul#lnksurvol_2 li a').removeClass('active_survol_2');
		myDiv = $(this).attr('rel');
		$('#'+myDiv).css ({display: 'block'});
		$(this).addClass('active_survol_2');
		$(this).blur();
		return false;
	});
	
	//15ans
	w = getPageWidth();
	x = (w-970)/2;
	xleft = Math.round(847+x);
	$('div.ans_15').css({left: xleft+'px', display: 'block'});
	
	
});

function divSwf() {
	swf = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="700" height="376" title="Comprende la virtualisation">';
	swf += '<param name="movie" value="../swf/virtual.swf" />';
	swf += '<param name="quality" value="high" />';
  	swf += '<embed src="../swf/virtual.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="700" height="376"></embed>';
	swf += '</object>';
	swf += '<p><a href="#" onclick="divSwf(); return(false);">Fermer</a></p>';
	$('#divSwf').html(swf);
	$('#divSwf').toggle();	
}