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

	$$('div.toggler').each(function(toggler, index) {
	  toggler.index = index;
		toggler.addEvent('mouseenter', function() {
		  setTogglers(this);
		});
	});
});

function setTogglers(toggler) {
	toggler = document.id(toggler);
	togglers = $$('div.toggler');
  var right = 819;

	toggler_found = false;
	for (var i=0; i<togglers.length; i++) {

			  togglerOther = togglers[i];
				right -= 163;

				if (toggler == togglerOther) {
					toggler.set('morph', {duration: 300, transition: 'linear'});
					toggler.morph({width: 320, right: right});
					el = document.id('closed_'+toggler.getProperty('id').substr(8));
					el.fade('out','fast');
					el = document.id('button_'+toggler.getProperty("id").substr(8));
					el.set('morph', {duration: 50, transition: 'linear'});
					el.morph({right: 20});
					toggler_found = true;
				} else {

					togglerOther.set('morph', {duration: 50, transition: 'linear'});
					el = document.id('closed_'+togglerOther.getProperty('id').substr(8));
					el.fade('in');
					el = document.id('button_'+togglerOther.getProperty("id").substr(8));
					el.set('morph', {duration: 50, transition: 'linear'});
					el.morph({right: 6});

					if (toggler_found) {
						togglerOther.morph({width: 163, right: right});
					} else {
						togglerOther.morph({width: 163, right: right + 158});
					}

				}
			}

		}



