var TvCursor = $.klass({
  
  initialize: function(options)
    {
    this.options = options;
    
    if($("#broadcasts").length == 0) return false;
    
    $("#content").append('<div id="cursor"><span class="handler"></span><span class="bottom"></span></div>');
    
    this.cursor = $("#cursor");
    
    this.move_cursor();
    
    var obj = this;
    this.timer = setInterval(function(){ obj.move_cursor.apply(obj); }, 60000);
    },
  
  move_cursor: function()
    {
    var date = new Date();
    var hour = date.getHours();
    var mins = date.getMinutes();
    
    var offset = (hour * 60 + mins) - (Nav.start * 60);
    var start = (this.options.hour_width * offset) / 60 + this.options.channel_width; // - (this.options.cursor_width / 2); don't understand why it don't work with this
    var max = (this.options.hour_width * ((Nav.end * 60) - (Nav.start * 60))) / 60 + this.options.channel_width;
    
    if(offset < 0 || start >= max) this.cursor.hide(); 
    else
      {
      var height = $("#content").outerHeight();
      this.cursor.css({ height: height, left: start }).show();
      this.cursor.find("span.bottom").css({ height: (height - this.cursor.find("span.bottom").height()) });
      }
    }
    
  });
