function honneurverslebas()
{


setTimeout(function() { 

  $("#honneur").animate({"top": "-=340px"}, 2000, function(){
         
    honneurversladroite();
    } );
    
     }, 2000);
    
}


function honneurversladroite() {


setTimeout(function() { 

  $("#honneur").animate({"left": "-=900px"}, 2000, function(){
         
    honneurverslehaut();
    } );

 }, 2000);



}



function honneurverslehaut() {


setTimeout(function() { 

  $("#honneur").animate({"top": "+=340px"}, 2000, function(){
         
     honneurverslagauche();
    } );

 }, 2000);



}



function honneurverslagauche() {


setTimeout(function() { 

  $("#honneur").animate({"left": "+=900px"}, 2000, function(){
         
    honneurverslebas();
    } );

 }, 2000);



}





function banniereintelligente() {




  $("#banniere").animate({"marginTop": "-=80px"}, 2000, function(){
    banniereintelligente2();     
 
    } );
    
    
    
    

}


function banniereintelligente2() {



setTimeout(function() { 
  $("#banniere").animate({"marginTop": "+=80px"}, 2000, function(){
         
   avancercaddie2();
  
   
    } );
 }, 5000);




}

function banniereintelligente3() {




  $("#banniere2").animate({"marginTop": "+=100px"}, 2000, function(){
         
 
    banniereintelligente4();
    } );
 




}


function banniereintelligente4() {


setTimeout(function() { 

  $("#banniere2").animate({"marginTop": "-=100px"}, 2000, function(){
      avancercaddie3();   
   
    } );
 }, 5000);




}


function avancercaddie()
{
    $("#bannierelimite").animate({backgroundPosition: '-60px 40px'}, 2000, function(){
       
   banniereintelligente();
     } );
}



function avancercaddie2()

{

var imageUrl = 'http://www.pricereduc.com/images/caddieversladroite.png';

    $('#bannierelimite').css({backgroundPosition: '-128px -10px'}); 
    $('#bannierelimite').css('background-image', 'url(' + imageUrl + ')');

    
    
    $("#bannierelimite").animate({backgroundPosition: '950px -10px'}, 2000, function(){
   

     banniereintelligente3();
      
     } );
   
     
     
     
     
}


function avancercaddie3()
{


    $('#bannierelimite').css({backgroundPosition: '950px -40px'}); 
  var imageUrl = 'http://www.pricereduc.com/images/caddieverslagauche.png';
   $('#bannierelimite').css('background-image', 'url(' + imageUrl + ')'); 
    $("#bannierelimite").animate({backgroundPosition: '-60px 40px'}, 1000, function(){
     banniereintelligente();
  /* banniereintelligente4(); */
  
  
  } );
     
}

	var demarrerenligne =1;
function tool1deroule()
		      {
	
if(demarrerenligne==1)
{
	
	demarrerenligne=2;
	
	$("#tool1deroule").slideToggle("slow");  
	  $.get("http://www.nouvelle-poesie.com/tools/enligne.php",function(html) {
$("#tool1deroule").html('Membres en Ligne<br />'+html).fadeIn();

});
	  
	  
}
else if(demarrerenligne==2){
	   $("#tool1deroule").slideToggle("slow"); 
	  demarrerenligne=1;
	
}
		      }
		      
		      
		      
		      



function amisattente()
{
  
    $.get("http://www.nouvelle-poesie.com/tools/amisattente.php",function(html) {
$("#tool2deroule").html('POTENTIELS AMIS EN ATTENTE<br />'+html).fadeIn();

});
  
}


		      
		      

	var demarrerenligne2 =1;
function tool2deroule(action,numamis)
		      {
	
if(demarrerenligne2==1)
{
	
	demarrerenligne2=2;
	
	$("#tool2deroule").slideToggle("slow");  
	
	
	
if(action==1)
{
	
	  $.get("http://www.nouvelle-poesie.com/tools/amisenligne.php",function(html) {
$("#tool2deroule").html('MES AMiS<br />'+html).fadeIn();

});
	  
}	
	
	
else if(action==2)
{
	
	  $.get("http://www.nouvelle-poesie.com/tools/ajouteramis.php?quelamis="+numamis,function(html) {
$("#tool2deroule").html('MES AMiS POTENTIELS<br />'+html).fadeIn();

});
	  
}	
	
	
	
else if(action==3)
{
	
	  $.get("http://www.nouvelle-poesie.com/tools/amisattente.php",function(html) {
$("#tool2deroule").html('POTENTIELS AMIS EN ATTENTE<br />'+html).fadeIn();

});
	  
}	
	
	
	
	
	
	
	
	
	
	
	
	
	
	  
}
else if(demarrerenligne2==2){
	   $("#tool2deroule").slideToggle("slow"); 
	  demarrerenligne2=1;
	
}
   }

function ajouteramis(amispotentiel)
{
  	  $.get("http://www.nouvelle-poesie.com/tools/ajouteramis.php?etreamis="+amispotentiel,function(html) {
$("#resultatamis").html(html).fadeIn();
});  
}



function accepterami(amispotentiel)
{
  
   if(confirm("Voulez vous vraiment accepter ce futur ami?"))
  {
  
  	  $.get("http://www.nouvelle-poesie.com/tools/validerami.php?accepter="+amispotentiel,function(html) {
$("#potentielami"+amispotentiel).html(html).fadeIn();
});
	  
	  
  }
}


function refuserami(amispotentiel)
{
  
   if(confirm("Voulez vous vraiment refuser ce futur ami?"))
  {
  
  
  
  	  $.get("http://www.nouvelle-poesie.com/tools/validerami.php?refuser="+amispotentiel,function(html) {
$("#potentielami"+amispotentiel).html(html).fadeIn();
});
	  
  }
}


function supprimerami(ami)
{
  
  
  if(confirm("Voulez vous vraiment supprimer votre Ami?"))
  {
  
  	  $.get("http://www.nouvelle-poesie.com/tools/validerami.php?delete="+ami,function(html) {
$("#ami"+ami).html("").fadeIn();
});
	  
	  
  }
	  
	  
}



function ajoutertextefavori(queltexte)
{
  
   if(confirm("Voulez-vous vraiment ajouter ce texte dans votre liste de textes favoris?"))
  {
  
  	  $.get("http://www.nouvelle-poesie.com/tools/favoristexte.php?ajouter="+queltexte,function(html) {
$("#textefavori"+queltexte).html(html).fadeIn();
});
	  
	  
  }
}


function supprimertextefavori(queltexte)
{
  
   if(confirm("Voulez-vous vraiment supprimer ce texte de votre liste de textes favoris?"))
  {
  
  	  $.get("http://www.nouvelle-poesie.com/tools/favoristexte.php?supprimer="+queltexte,function(html) {
$("#textefavori"+queltexte).html(html).fadeIn();
});
	  
	  
  }
}





		   

function avancerbrillant()
{
    $("#brillant").animate({backgroundPosition: '500px 0px'}, 3000, function(){
       
   avancerbrillant2();
     } );
}

function avancerbrillant2()
{
    $("#brillant").animate({backgroundPosition: '0px 0px'}, 3000, function(){
       
   avancerbrillant();
     } );
}

function dirigerverscom(lequel) {



$.scrollTo( '#com'+lequel, 800, {easing:'elasout'} );

}


  $(document).ready(function() {
       	
avancerbrillant();     

  $('#header').click(function() {
  
 
 window.location.href="http://www.nouvelle-poesie.com";
  
 
  
  });



	
				
	$(".iframegestion").colorbox({width:"50%", height:"70%", iframe:true});
			
			
			
		



  
   });
