	$(function(){
			$.fn.supersized.options = {  
				startwidth: 640,  
				startheight: 480,
				vertical_center: 1,
				slides : [
					{image : 'media/img/bgNature.jpg' }
				]
			};
	        $('#supersized').supersized(); 
	    });
	

  $(function(){ 
  
  settings = {
          tl: { radius: 10 },
          tr: { radius: 10 },
          bl: { radius: 10 },
          br: { radius: 10 },
          antiAlias: true,
          autoPad: true,
          validTags: ["div"]
      }
	  
 settings2 = {
          tl: { radius: 10 },
          tr: { radius: 10 },
          bl: { radius: 10 },
          br: { radius: 10 },
          antiAlias: true,
          autoPad: true,
          validTags: ["div"]
      }

  $('.colouredBox').corner(settings);
 /*$('#content').corner();
 $('#content').animate({"opacity": "0"}, "fast");*/ 
   $('.athome a').animate({"opacity": "0.85"}, "fast");
  
  });;
  
	
$(document).ready(function(){
$(".allLnk").hover(
function() {	
$(this).stop().animate({"opacity": "0.8"}, "slow");
$(this).css("cursor","pointer").find("p a").css("text-decoration","underline");
$(this).removeClass("inactive");
$(this).addClass("active");		
},
function() {
$(this).stop().animate({"opacity": "1"}, "slow");
	$(this).addClass("inactive");		
        $(this).find("a").css("text-decoration","none");}).click(function(e){
            document.location.href = $(this).find("a").attr("href");
            e.preventDefault();
});
 
});





/*Rollovers*/
		
$(document).ready(function() {
		
		// Preload all rollovers
		$(".roll img").each(function() {

			// Set the original src
			rollsrc = $(this).attr("src");
			rollON = rollsrc.replace(/.jpg$/ig,"_f2.jpg");
			$("<img>").attr("src", rollON);
		});
		
		// Navigation rollovers
		$("a.roll").mouseover(function(){
			$(this).animate({"opacity": "0.5"}, "slow");
			$(this).animate({"opacity": "1"}, "fast");
			imgsrc = $(this).children("img").attr("src");
			matches = imgsrc.match(/_f2/);
			
			// don't do the rollover if state is already ON
			if (!matches) {
			imgsrcON = imgsrc.replace(/.jpg$/ig,"_f2.jpg"); // strip off extension
			$(this).children("img").attr("src", imgsrcON);
			}
			
		});
		$("a.roll").mouseout(function(){
			$(this).stop().animate({"opacity": "1"}, "fast");
			$(this).children("img").attr("src", imgsrc);
		});
		
	
	});


    
    //Ouverture de lien valide

function open_ext_link()
{
	var liens = document.getElementsByTagName('a');
	// On récupèretous les liens du document dans une variable (un array), ici liens.
	// Une boucle qui parcourt le tableau (array) liens du début à la fin.
	for (var i = 0 ; i < liens.length ; ++i)  {
		// Si les liens ont un nom de class égale à lien_ext, alors on agit.
		if (liens[i].className == 'ext_link')  {
			/*liens[i].title = 'S\'ouvre dans une nouvelle fenetre';*/
			// Au clique de la souris.
			liens[i].onclick = function()  {
				window.open(this.href);
				return false; // On ouvre une nouvelle page ayant pour URL le href du lien cliqué et on inhibe le lien réel.
			};
		}
	}
}
window.onload = open_ext_link;
// Au chargement de la page, on appelle la fonction.
