﻿	$(document).ready(function () {
//titre de la home en flash
var texteligne1 = $(".titre_home h1").html();
var texteligne2 = $(".titre_home h2").html();
$(".titre_home").html('<object type="application/x-shockwave-flash" data="/Documents/FTP/300/interface/bienvenue.swf" width="430" height="75"><param name="movie" value="/Documents/FTP/300/interface/bienvenue.swf" /><param name="wmode" value="transparent" /><param name="flashvars" value="texteligne1='+texteligne1+'&texteligne2='+escape(texteligne2)+'" />'+$(".titre_home").html()+'</object>');
		//initialisation de la liste des articles
		$(".actu_home").after('<div class="actu_separ"></div>');
		var nb_actu_home = $(".actu_home").length;
		$("#mask_content").css('width',((nb_actu_home*281)-6)+'px');
		// action sur les flèches
		$(".actu_prec").click(function () {
			$("#liste_actu").stop().scrollTo( '-=281px', { queue:true, duration:800, axis:'x'} );
			return false;
		});
		$(".actu_suiv").click(function () {
			$("#liste_actu").stop().scrollTo( '+=281px', { queue:true, duration:800, axis:'x'} );
			return false;
		});
		// action de la molette
		$('#liste_actu').mousewheel(function(event, delta) {
            if (delta > 0){
            	$("#liste_actu").stop().scrollTo( '-=281px', { queue:true, duration:100, axis:'x' });
			}else if (delta < 0){
            	$("#liste_actu").stop().scrollTo( '+=281px', { queue:true, duration:100, axis:'x' });
			}
            event.preventDefault();
		});
		
		
		//lien ouverture extrait actu
		$(".actu_home img").mouseover(function () {
			$(".excerpt").stop().animate({ bottom: "-100px" }, 500);
			$(this).nextAll(".excerpt").stop().animate({ bottom: "0px" }, 500);
			return false;
		});
		
		//box sur les liens d'accès
		$("a.link_acces").attr({ rel: "shadowbox;width=408;height=205;" });
		$("a.link_inscription").attr({ rel: "shadowbox;width=408;height=305;" });
	});
	
	
	

