//////////////////////////////////////////////////////////////////////////////////////////////// Focus 

focusAccueil=new Object();
focusAccueil.init=function(){
	$("#focus").hover(function(){  
  		$("#focus").stop().animate({height: 550}, {duration: 500 ,easing:'easeInOutExpo'});
  		$("#grille").stop().animate({height: 550}, {duration: 500 ,easing:'easeInOutExpo'});
		$("#accueil").stop().animate({height: 0}, {duration: 500 ,easing:'easeInOutExpo'});
		$("#titre").stop().animate({top: 250},{duration: 800 ,easing:'easeInOutExpo'});
		$("#titreFocus").stop().animate({top: -100},{duration: 500 ,easing:'easeInOutExpo'});
 	}, function(){  
  		$("#focus").stop().animate({height: 100}, {duration: 500 ,easing:'easeInOutExpo'});
  		$("#grille").stop().animate({height: 100}, {duration: 500 ,easing:'easeInOutExpo'});
  		$("#accueil").stop().animate({height: 450}, {duration: 500 ,easing:'easeInOutExpo'});
  		$("#titre").stop().animate({top: 600}, {duration: 500 ,easing:'easeInOutExpo'});
  		$("#titreFocus").stop().animate({top: 0},{duration: 400 ,easing:'easeInOutExpo'});
  	});
  	
  	$('#grille').click(function(){
		var link = $(this).attr('data-url');
    	window.location.href=link;
    });
    
    $('#lasters article a').css({opacity:0})
    
    $('#lasters article').hover(
		function () {
			$(this).children("a").stop().animate({opacity: 1},250);
		}, 
		function () {
			$(this).children("a").stop().animate({opacity: 0},250);
		}
	);
    
};


//////////////////////////////////////////////////////////////////////////////////////////////// Détail

detail=new Object();
detail.init=function(){
	
	/*$('#slide').nivoSlider({
		effect:'sliceDown', //Specify sets like: 'fold,fade,sliceDown'
		slices:30,
		animSpeed:1000, //Slide transition speed
		pauseTime:6000,
		startSlide:0, //Set starting Slide (0 index)
		directionNav:false, //Next & Prev
		directionNavHide:false, //Only show on hover
		controlNav:false, //1,2,3...
		controlNavThumbs:false, //Use thumbnails for Control Nav
        controlNavThumbsFromRel:false, //Use image rel for thumbs
		keyboardNav:false, //Use left & right arrows
		pauseOnHover:false, //Stop animation while hovering
		manualAdvance:false, //Force manual transitions
		captionOpacity:0.8, //Universal caption opacity
	});*/
	
	$(window).keydown(function(e){ 
        switch (e.keyCode) { 
            case 37: // flèche gauche 
            	var selected = $('#prev');
				selected.click();
            	break; 
            case 39: // flèche droite 
            	var selected = $('#next');
            	selected.click();
				break; 
        } 
    });
    
    $('#lasters article a').css({opacity:0})
    
    $('#lasters article').hover(
		function () {
			$(this).children("a").stop().animate({opacity: 1},250);
		}, 
		function () {
			$(this).children("a").stop().animate({opacity: 0},250);
		}
	);
          	
};




/////////////////////////////////////////////////////////////////////////////////////////////////// FOOTER
	
/*foot=function(){

	var Gscreen = $(window).height();
	var Tfooter = $("#footer").position();
	var Gfooter = Tfooter.top+250;
	
	
	if(Gscreen>Gfooter){
		var Gdiff = (Gscreen-Gfooter)+250;
		$("#footer").css({height:Gdiff});
	}
	

	$(window).resize(function() {
	
		var Gscreen = $(window).height();
		var Tfooter = $("#footer").position();
		var Gfooter = Tfooter.top+250;
		
		
		if(Gscreen>Gfooter){
			var Gdiff = (Gscreen-Gfooter)+250;
			$("#footer").css({height:Gdiff});
		}	
	
	});
	
};	*/	
	
	
