window.addEvent('domready', function() {

var stops = $$('div.stop');
	
	stops.addEvents({
	    'mouseover': function(){
		    this.style.fontWeight = "bold";
			this.style.cursor = "pointer";
			if(!this.firstChild.nodeValue){
				this.firstChild.style.visibility='visible';
			}
          },
        'mouseout' : function(){
          this.style.fontWeight = "normal";
			this.style.cursor = "auto";
			if(!this.firstChild.nodeValue && !(a==1)){
			   this.firstChild.style.visibility='hidden';
			}
		  }
    });
    
var divisions = $$('h1.division');
	divisions.addEvents({
	    'mouseover': function(){
		  this.style.cursor = "default";
        },
        'mouseout' : function(){
          this.style.cursor = "auto";
		}
    });

var show = $$('div.show');
	show.addEvents({
		'mouseover': function(){
		  this.style.cursor = "pointer";
		  this.style.textDecoration = "underline";
        },
        'mouseout' : function(){
          this.style.cursor = "auto";
          this.style.textDecoration = "none";
		},
		'click' : function(){
		  $$('div.details').each(function(element,index){
			element.style.visibility='visible';
			a = 1;
		  });
		}
	});

var hide = $$('div.hide');
	hide.addEvents({
		'mouseover': function(){
		  this.style.cursor = "pointer";
		  this.style.textDecoration = "underline";
        },
        'mouseout' : function(){
          this.style.cursor = "auto";
          this.style.textDecoration = "none";
		},
		'click' : function(){
		  $$('div.details').each(function(element,index){
			element.style.visibility='hidden';
			a = 0;
		  });
		}
	});
});