$(document).ready(function(){
	//Menu déroulant
	$('ul.menu').menuBox();
	
	//Lien pour nouvelle page
	$('a[class^="_blank"]').click(function(){
		window.open(this.href, '_blank');
		return false;
    });
	
	//Diaporama
	if( $('#slides').length ){
		$("#slides").slides({
			preload: false,
			play: 5000,
			effect : 'slide',
			next: 'next',
			prev: 'prev',
			generatePagination : false
		}); 
	}
	
	//Pretty photo
	if( $("a[rel^='prettyPhoto']").length ){
		$("a[rel^='prettyPhoto']").prettyPhoto({
			deeplinking : false,
			social_tools: ""
		});
	}
	
	//facebox 
	 if ($("a[rel*=facebox]").length){
		 $('a[rel*=facebox]').facebox({
			 loadingImage : '/interface/img/jquery/facebox/loading.gif',
		      closeImage   : '/interface/img/jquery/facebox/closelabel.png'	  
		 });
	 }
	
	// Fade bouton Testez
	setInterval(function(){
	var versions = $('.articlic-demo:visible');
	if(versions.length<2){
			$('.articlic-demo').fadeIn(800);
		}
	else{
			versions.eq(0).fadeOut(800);
		}
	},1000);
	
	
	//effacer value par defaut sur input connexion
	$('.e-mail-connexion').click(function(){
		if (this.value=='Identifiant'){
		this.value='';	
		}
    });
	$('.mdp-connexion').click(function(){
		if (this.value=='Mot de passe'){
		this.value='';	
		}
    });
	$('#picto-performant').mouseover(function(){
		
		$('#box-picto-performant').show();
		
    });
	$('#picto-performant').mouseout(function(){
		
		$('#box-picto-performant').hide();
	
	});
	
$('#picto-casque').mouseover(function(){
		
		$('#box-picto-casque').show();
		
    });
	$('#picto-casque').mouseout(function(){
		
		$('#box-picto-casque').hide();
	
	});
	
$('#picto-print').mouseover(function(){
		
		$('#box-picto-print').show();
		
    });
	$('#picto-print').mouseout(function(){
		
		$('#box-picto-print').hide();
	
	});
	
$('#picto-smile').mouseover(function(){
		
		$('#box-picto-smile').show();
		
    });
	$('#picto-smile').mouseout(function(){
		
		$('#box-picto-smile').hide();
	
	});
	
$('#picto-euro').mouseover(function(){
		
		$('#box-picto-euro').show();
		
    });
	$('#picto-euro').mouseout(function(){
		
		$('#box-picto-euro').hide();
	
	});
	
$('#picto-world').mouseover(function(){
		
		$('#box-picto-world').show();
		
    });
	$('#picto-world').mouseout(function(){
		
		$('#box-picto-world').hide();
	
	});
	
	
	
});
