P2.archive = function() {
  return {
  
    timeline: function(url, date, selector) {
      $(function() {
        Timeline.Debug.exception = function(e) { return true; };
        var src = new Timeline.DefaultEventSource();
        var bands  = [
            Timeline.createBandInfo({
              eventSource:    src,
              theme:          Timeline.P2Theme.create({hAlign: 'Bottom'}),
              date:           date,
              intervalUnit:   Timeline.DateTime.DAY,
              intervalPixels: 40,
              width:          '10%',
              trackHeight:0.5,
              trackGap:0.2,
              showEventText:  false
            }),
            Timeline.createBandInfo({
              eventSource:    src,
              theme:          Timeline.P2Theme.create(),
              date:           date,
              intervalUnit:   Timeline.DateTime.HOUR,
              multiple: 2,
              intervalPixels: 20,
              width:          '90%'
            }) ];
        bands[1].syncWith = 0;
    
        Timeline.create($(selector || '#timeline')[0], bands).loadJSON(url, function(json, url) { src.loadJSON(json, url); });
    
        return this;
      });
    },
  
    page: function() {
      P2.page();
      $(function() {
        P2.appMenu();
      });
      return this;
    }
    
  }
}();

