
var App = Class.create({

  // Inicializace
  //____________________________________________________________________________
  //////////////////////////////////////////////////////////////////////////////
  initialize : function()
  {
    var that = this;
    Event.observe(document, 'dom:loaded', function() {
      var mapContainer = $('map_canvas');

      if(mapContainer) {
        this.mapController = new Map(mapContainer);
      }
      that.initMoreButtons();
    });
  },
  
  // More buttons
  //____________________________________________________________________________
  //////////////////////////////////////////////////////////////////////////////
  initMoreButtons : function()
  {
    var that = this;
    
    $$('div.more_content').each(function(content) {
      content.hide();
    });
    
    $$('a.more').each(function(more) {
      Event.observe(more, 'click', function(event) {
        Event.stop(event);
        var content = more.next('div.more_content');
        if(content.visible()) {
          content.hide();
        }
        else {
          content.show();
        }
      });
    });
    
    $$('a.more2').each(function(more) {
      Event.observe(more, 'click', function(event) {
        Event.stop(event);
        var content = more.up('h3').next('div.more_content');
        if(content.visible()) {
          content.hide();
        }
        else {
          content.show();
        }
      });
    });
  }

});

new App();

