BannerExchanger = function(config) {
  // configurable {
  this.selector = ''; // required
  this.delay = 20;
  this.url = '/module/ad/rand/';
  // }
  $.extend(this, config);
  
  this.init();
}

BannerExchanger.prototype = {
  init: function() {
    this.startTimer();
  },
  
  startTimer: function() {
    setTimeout($.proxy(this.onStartLoadBanner, this), this.delay * 1000);
  },
  
  loadBanner: function() {
    this.getEl().load(this.url, $.proxy(this.onLoadBanner, this));
  },
  
  onStartLoadBanner: function() {
    this.loadBanner();
  },
  
  onLoadBanner: function() {
    this.startTimer();
  },
  
  getEl: function() {
    return $(this.selector);
  }
}

