this.Letreiro = Class.create({
  txtTit:null,
  txtSubtit:null,
  txtHalf:null,
  txtTime:null,
  image:null,
  t:0,
  realTime:0,
  fakeTime:0,
  header:null,
  sub:null,
  
  initialize: function()
  {
    this.txtTit = jQuery( "#letreiro_tit" );
    this.txtSubtit = jQuery( "#letreiro_subtit" );
    this.txtHalf = jQuery( "#letreiro_tempo" );
    this.txtTime = jQuery( "#letreiro_time" );
    this.image = jQuery( "#letreiro_img" );
    
    this.loadData();
  },
  
  loadData: function()
  {
    // TODO: load XML
    this.onLoadData();
  },
  
  onLoadData: function()
  {
    // TODO: get chosen XML data
    this.drawInfo( "Bras\u00EDlia stadium", "Get to know this city. Visit http://www.brasilnetwork.tur.br/worldcup", "img/imgLetreiro.png" );
  },
  
  drawInfo: function( head, subHead, image )
  {
    this.header = new TextSlider( head, jQuery( this.txtTit ) );
    this.sub = new TextSlider( subHead, this.txtSubtit );
    jQuery( this.image ).attr( "src", image );
  },
  
  setTime: function( real, fake )
  {
     this.realTime = real;
     this.fakeTime = fake;
  },
  
  tick: function( time )
  {
    var t = time;
    var tF = t * this.fakeTime / this.realTime;
    
    if( t >= this.realTime ) tF = this.fakeTime;
    var date = new Date( tF );
    jQuery(this.txtHalf).text(tF < this.fakeTime / 2 ? "1st half" : "2nd half");
    jQuery(this.txtTime).text( this.twoChar( ( date.getUTCHours() * 60 ) + date.getUTCMinutes() ) + ":" + this.twoChar( date.getUTCSeconds() ) );
  },
  
  twoChar: function( txt )
  {
    return txt < 10 ? "0" + txt : txt;
  },
  
  reset: function()
  {
    jQuery(this.txtHalf).text( "1st half" );
    jQuery(this.txtTime).text( "00:00" );
  }
  
});
