/* Script pour Netophonix, alternative pour le Neto-Pub-Flash, *
 * utilise JQuery et Javascript. By Signez pour Mitch_dsm,     *
 * le 26 Août 2007, distribué sous licence GNU/GPL.            */

// Détection d'Internet Explorer...
var ieUsed;
if($.browser.msie && $.browser.version < 7) ieUsed = true;

// Exécution du script lorsque le navigateur a chargé la page...
$(document).ready(function(){
   // Inclusion du Neto_Bot
   $.get("/includes/irc_stat.php");
   $("#conteneurDePub").fadeIn("slow", function(){
      $.get("functions_ban_java.php?script", function(bannieres){
         defilNetoPub(bannieres, 0);
      });
   });
});

function defilNetoPub(bannieres, compteur){
   $("#conteneurDePub a").animate({top: (ieUsed) ? 0 : -60, opacity: 0}, "slow", function(){
      $("#conteneurDePub a").remove();
      $(bannieres).filter("a:eq(" + compteur + ")")
         .css({top: (ieUsed) ? 0 : 60, opacity: 0, zIndex: 0})
         .appendTo($("#conteneurDePub"))
         .animate({top: 0, opacity: 1}, "slow", function(){
            if(compteur == 5){ 
               compteur = 0;
            }else{
               compteur++;
            };
            setTimeout(function(){ defilNetoPub(bannieres, compteur); }, 8000);
      });
   });
}


/*$(".forumline:eq(1) tr:eq(5) td")
 .each(function(){
    this.html = "<div>" + this.html + "</div>";
 }).filter("div").animate({opacity: 0}, function(){
   this.css("height", "2em").html("", function(){
      $(".forumline:eq(1) tr:eq(5) td").animate({maginTop: 0, marginBottom: 0}, function(){
         this.filter("div").slideUp(function(){
            this.remove();
            $(".forumline:eq(1) tr:eq(5) td").animate({opacity: 0}, function(){
               this.remove().parents("tr").remove();
            })
         })
      })
   }); 
 });*/


