Global.js

De la Wiki Grepolis RO
Jump to navigation

$(document).ready(function() {

  var anunt_list=$(".anunt_primapagina");
  var anunt_curent=0;
  var ch_anunt=function() {
       anunt_list[anunt_curent].fadeOut();
       anunt_curent++;
       if (anunt_curent > anunt_list.length) {
         anunt_curent=0;
       }
       anunt_list[anunt_curent].fadeIn();
       var anunt_timer=setTimeOut("ch_anunt()",2000);
  }
  if (anunt_list.length > 1) {
      anunt_list[0].fadeIn();
      setTimeOut("ch_anunt()",2000);
  } else {
      if (anunt_list.length > 0) {
           anunt_list[0].fadeIn();
       }
  }

});