$(document).ready(function()
{
	
	// liens d'evitement
	$(".accessibilite").addClass('accessibilite_off');
	$(".accessibilite a").focus(function(){
		$("../../..", this).removeClass('accessibilite_off');
	});

	$(".accessibilite a").blur(function(){
		$("../../..", this).addClass('accessibilite_off');
	});
	
	$(".quick_print").click(function(){
		window.print();
		 return false;
	});
	
	
	//agrandissement du texte
	$(".service .small_text").click(function(){
		if ($(".service").attr("class") == 'service'){
			$(".service").addClass('typo_plus_1');
			$(".content p").addClass('typo_plus_1');
			$(".content li").addClass('typo_plus_1');
			$(".content h1").addClass('typo_h1_plus_1');
			$(".content h2").addClass('typo_h2_plus_1');
		}else
		if ($(".service").attr("class") == 'service typo_plus_1'){
			$(".service").removeClass('typo_plus_1');
			$(".service").addClass('typo_plus_2');
			
			$(".content p").addClass('typo_plus_2');
			$(".content li").addClass('typo_plus_2');
			$(".content h1").addClass('typo_h1_plus_2');
			$(".content h2").addClass('typo_h2_plus_2');
			
			$(".content p").removeClass('typo_plus_1');
			$(".content li").removeClass('typo_plus_1');
			$(".content h1").removeClass('typo_h1_plus_1');
			$(".content h2").removeClass('typo_h2_plus_1');
		}else
		if ($(".service").attr("class") == 'service typo_plus_2'){
			$(".service").removeClass('typo_plus_2');
			$(".service").addClass('typo_plus_3');
			
			$(".content p").addClass('typo_plus_3');
			$(".content li").addClass('typo_plus_3');
			$(".content h1").addClass('typo_h1_plus_3');
			$(".content h2").addClass('typo_h2_plus_3');
			
			$(".content p").removeClass('typo_plus_2');
			$(".content li").removeClass('typo_plus_2');
			$(".content h1").removeClass('typo_h1_plus_2');
			$(".content h2").removeClass('typo_h2_plus_2');
		}else
		if ($(".service").attr("class") == 'service typo_moins_1'){
			$(".service").removeClass('typo_moins_1');
			$(".content p").removeClass('typo_moins_1');
			$(".content li").removeClass('typo_moins_1');
			$(".content h1").removeClass('typo_h1_moins_1');
			$(".content h2").removeClass('typo_h2_moins_1');
		}
	});
	
	//retrecissement du texte
	$(".service .big_text").click(function(){
		if ($(".service").attr("class") == 'service'){
			$(".service").addClass('typo_moins_1');
			$(".content p").addClass('typo_moins_1');
			$(".content li").addClass('typo_moins_1');
			$(".content h1").addClass('typo_h1_moins_1');
			$(".content h2").addClass('typo_h2_moins_1');
		}else
		if ($(".service").attr("class") == 'service typo_plus_1'){
			$(".service").removeClass('typo_plus_1');
			$(".content p").removeClass('typo_plus_1');
			$(".content li").removeClass('typo_plus_1');
			$(".content h1").removeClass('typo_h1_plus_1');
			$(".content h2").removeClass('typo_h2_plus_1');

		}else
		if ($(".service").attr("class") == 'service typo_plus_2'){
			$(".service").removeClass('typo_plus_2');
			$(".service").addClass('typo_plus_1');
			$(".content p").addClass('typo_plus_1');
			$(".content li").addClass('typo_plus_1');
			$(".content h1").addClass('typo_h1_plus_1');
			$(".content h2").addClass('typo_h2_plus_1');
			
			$(".content p").removeClass('typo_plus_2');
			$(".content li").removeClass('typo_plus_2');
			$(".content h1").removeClass('typo_h1_plus_2');
			$(".content h2").removeClass('typo_h2_plus_2');

		}
		else
		if ($(".service").attr("class") == 'service typo_plus_3'){
			$(".service").removeClass('typo_plus_3');
			$(".service").addClass('typo_plus_2');
			$(".content p").addClass('typo_plus_2');
			$(".content li").addClass('typo_plus_2');
			$(".content h1").addClass('typo_h1_plus_2');
			$(".content h2").addClass('typo_h2_plus_2');
			
			$(".content p").removeClass('typo_plus_3');
			$(".content li").removeClass('typo_plus_3');
			$(".content h1").removeClass('typo_h1_plus_3');
			$(".content h2").removeClass('typo_h2_plus_3');

		}
	});
	
	// popup 	
	$("a:not(.popup_dev)").click(function(){
		if(this.href.indexOf(window.location.hostname)==-1){
			window.open(this.href,'newwin','menubar=yes,resizable=yes,fullscreen=yes,scrollbars=yes,toolbar=yes,titlebar=yes,location=yes');
			return false;
		}
	});
	
	// popup 	
	$("a.popup_dev").click(function(){		
		window.open(this.href, 'newwindow','menubar=no,resizable=yes,scrollbars=yes,toolbar=no,titlebar=yes,location=no,width=950,height=700');
		return false;
	});
	
	// popup 	
	$("a.popup").click(function(){		
		window.open(this.href,'newwin','menubar=yes,resizable=yes,fullscreen=yes,scrollbars=yes,toolbar=yes,titlebar=yes,location=yes');
		return false;
	});	
});
