var SubContent = {

	initialize: function()
	{
	
		var titles = $$("#mainCol .expand h1.title");
		
		var acc = $$("#mainCol .expand div.element");
		
		titles.each( function(title,index){ 
			
			title.id = "title_" + index;

			
			title.observe('mouseover', function(event){ 
			
				this.setStyle({
					backgroundColor: '#333',
					backgroundImage: 'images/bg_h1_expand2.gif',
					backgroundRepeat: 'no-repeat',
					backgroundPosition: '645px 14px',
					cursor: 'pointer'				
				});
			
			});
			
			title.observe('mouseout', function(event){ 
											   
				this.setStyle({
					backgroundColor: '#666',
					backgroundImage: 'images/bg_h1_expand.gif',
					backgroundRepeat: 'no-repeat',
					backgroundPosition: '645px 14px',
					cursor: 'pointer'				
				});
				
						
			});
			
			title.onclick = function(){ 
				var id = "acc_" + this.id.replace(/title_/, '');
				if(window.oldBlind)
					new Effect.toggle(window.oldBlind,'blind');
					
				new Effect.toggle(id, 'blind');
				
				if(id == window.oldBlind)
					window.oldBlind = undefined;
				else
					window.oldBlind = id;
			};
			
		});
		
		
		acc.each( function(a,index){ 
		
			a.id = "acc_" + index;
			a.style.display = "none";
		
		});
		
	}

}

Event.observe(window, 'load', function() { SubContent.initialize(); } );// JavaScript Document
