window.addEvent('domready', function(){
 
var Vysuvanie = new Class ({
  
  options: {
		farba: "Red"
	},
	
	initialize: function(options){
	  this.farba = options
	},
  
  up: function (){
    var slideMenuBlue = $('slideMenu'+this.farba);
    var pictureBlue = $('picture'+this.farba);
    var menuItems = $$('#slideMenu'+this.farba+' div');
    var countItems = 0;
    menuItems.each(function(element) {
      countItems++;
    });
    var height = countItems*25;
    slideMenuBlue.setStyle('opacity',0);
    var fx = new Fx.Styles(slideMenuBlue, {duration:200, wait:false});
    pictureBlue.addEvent('mouseover', function(){
  		fx.start({
  			'opacity': 0.9
  		});
      
  	});
  	pictureBlue.addEvent('mouseout', function(){
  		fx.start({
  			'opacity': 0
  		});
  	});
  }
});
new Vysuvanie("Red").up();
new Vysuvanie("Blue").up();
new Vysuvanie("Green").up();
new Vysuvanie("Orange").up();

});