/*function prepareGallery() {
  if (!document.getElementsByTagName) return false;
  if (!document.getElementById) return false;
  
  var gallery1 = document.getElementById("acc_1");
  var gallery2 = document.getElementById("acc_2");
  var gallery;
  var gallery_s;
  gallery1.style.color="black";
 gallery2.style.color="red"; 
 for ( var i=0; i<3; i++) {    
gallery_s= gallery +i;  
    gallery_s.onclick = function() {
    gallery1.style.color="black";
    gallery2.style.color="black";
	gallery_s.style.color="red";	
	}
    gallery_s.onkeypress = gallery_s.onclick;
  }
 
}

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}

addLoadEvent(prepareGallery);
*/


/*
window.addEvent('load', function() {
var start_1 = $('acc_1'), start_1 = $('acc_2');

	start_1.addEvent('click', function(e) {
		start_1.empty().addClass('ajax-loading'); 
		start_2.removeClass('ajax-loading'); 
	});
	
	start_2.addEvent('click', function(e) {
		start_1.removeClass('ajax-loading'); 		
        start_2.empty().addClass('ajax-loading'); 
	});
});
*/

window.addEvent('load', function() {
	var start_1 = $('accd_1'), 
	    start_2 = $('accd_2'),
		start_3 = $('accd_3'),
		start_4 = $('accd_4');

	start_1.addEvent('click', function(e) {
		start_1.addClass('ajax-loading'); 
		start_2.removeClass('ajax-loading');
		start_3.removeClass('ajax-loading');
		start_4.removeClass('ajax-loading');		
	});
	
	start_2.addEvent('click', function(e) {
		start_1.removeClass('ajax-loading'); 		
        start_2.addClass('ajax-loading');
		start_3.removeClass('ajax-loading');
		start_4.removeClass('ajax-loading');		
	});
	
	start_3.addEvent('click', function(e) {
		start_1.removeClass('ajax-loading'); 		
        start_2.removeClass('ajax-loading');
		start_3.addClass('ajax-loading');
		start_4.removeClass('ajax-loading');		
	});
	
	start_4.addEvent('click', function(e) {
		start_1.removeClass('ajax-loading'); 		
        start_2.removeClass('ajax-loading');
		start_3.removeClass('ajax-loading');
		start_4.addClass('ajax-loading');		
	});	
});

//http://demos.mootools.net/Ajax_Timed