$j(document).ready(function(){	
	$j(".zoom").colorbox();
	$j('#logo').click(function(){
		window.location = $j('#liensite').attr('href');
	});
	
	$j('#champrecherche').focus(function(){
		if($j(this).val() == 'recherche')
			$j(this).val('');
	});
	
	$j('#choixtypo span').click(function(event){
		var agrandissement = ($j(this).next('span').html() == 'Aa') ? true : false;
		$j('#mainWrapper *').each(function(){
			var oldSize = parseInt($j(this).css('font-size'));
			var newSize = (agrandissement) ? ((oldSize < 24) ? oldSize+2 : oldSize) : ((oldSize>6) ? oldSize-2 : oldSize);
			$j(this).css('font-size',newSize);
		});
	});
	//$j("#phpressobar").;
	
	lists_banne=$j("#rotator li");
	banne_id=0;
	banne_tour();
	
	$j("input[name$='object[]']").change(function(){
		if($j(this).val() == 'Assurance de Personnes')
			$j('#objectmore').show();
	});
	
});

function banne_tour(){
	var pid;
	now=-100*banne_id;
	$j("#rotator ul").animate({top: now+'px'}, "slow");
	banne_id=(banne_id+1>=lists_banne.size())?0:banne_id+1;
    setTimeout("banne_tour()",4000);
}

function verifNL(email){
	
	$j.post("index.php",{mdl:'mod_newsletter',act:'ajax',email:email}, function(retour){
		
		if(retour!=null){
			$j("#newsletter_content").hide();
			$j("#newsletter_content").html(retour);
			$j("#newsletter_content").fadeIn();
		}
		
	});
	
}
