Event.observe( window, 'load', initApp );

function initApp()
{
	var sub_layers = $$('.subLayer');
	sub_layers.each( function(item){ new SubLayer( item ); } );
}

var SubLayer = Class.create();
SubLayer.prototype = {
	initialize: function( htmlEl )
	{
		var par_el = htmlEl.up();
		Event.observe( par_el, 'mouseover', function(){ this.show() }.bind( htmlEl ) );	
		Event.observe( par_el, 'mouseout', function(){ this.hide() }.bind( htmlEl ) );
	}
};