function right() {
    var self = this;
    var timer;
    var stop = false;
    this.ajax = function() {
       if(stop == false) {
          $.ajax({
          url: "akceright.php",
          cache: false,
          success: function(html){
            $("#akceBox").fadeOut("fast");
            $("#akceBox").html(html);
            $("#akceBox").fadeIn("fast");
/*            timer = setTimeout(self.load, 5000);*/
          }
          });
       } else {
/*         timer = setTimeout(self.load, 5000);*/
       }
    };
/*    
    this.load = function() {
        clearTimeout(timer); 
        self.ajax();
    };
    
    this.init = function() {
       this.elm = document.getElementById('akceBox');
       self.addEvent(this.elm, 'mouseover', function() {
           stop = true;
       });
       self.addEvent(this.elm, 'mouseout', function() {
           stop = false; 
       } );
       this.load();
    };
    
    this.addEvent = function (obekt, evt, fce) {
         if (!obekt) return;
         if (obekt.addEventListener){ 
             obekt.addEventListener(evt, fce, false);
         } else if (obekt.attachEvent) {
           // Pro retarda IE
           obekt.attachEvent('on'+ evt, fce);
         } else {
           obekt['on'+ evt] = fce;   
         }
	  };

}

$(document).ready(function() {  
  right = new right();
  right.init();
});
*/

