/*
  etha.js:
    Etha AG Javascript Library
*/

/*
  costructor
*/



function Etha() {}

Etha.prototype.TopMenu = function(){
  try {
    if( $('topMenu') ){
      var level0 = $('topMenu').getElementsBySelector('li.level0');

      level0.each(
        function(el){
          var ul = Element.getElementsBySelector($(el),'ul');
          ul = ul.last();
          $(el).observe('mouseover', function(){
            $(el).addClassName('over');
            if( $(ul) ) $(ul).addClassName('block');
          });
          $(el).observe('mouseout', function(){
            $(el).removeClassName('over');
            if( $(ul) ) $(ul).removeClassName('block');
          });
        }
      );
    }
  } catch(e){
  }
}

Etha.prototype.Print = function(){
  try {
    if( $(printID) ){
      $(printID).observe('click', function(){
        window.print();
        return false;
      });
    }
  } catch(e){
  }
}


// Etha Object
var Etha = new Etha();

// Etha config

var printID= 'footer-26';

// EVENT
Event.observe(window, 'load', Etha.TopMenu, false);
Event.observe(window, 'load', Etha.Print, false);

