Event.observe(window, 'load', function() {
	$$('ul.student_experiences li a').invoke('observe', 'click', function(e) { 
		Event.stop(e);
		var _this = this;
		var i = 0;
		var height = this.getHeight();
		new Element.remove($('nuoli'));
		$$('ul.student_experiences li a').each(function(e) {
			if(i%2 != 0)
				e.className = 'even';
			else
				e.className = '';
			i++;
		});
		new Element.insert(this, '<img src="images/nuoli.gif" alt="<<" id="nuoli" />', { position: 'before' });
		$('nuoli').style.top = ((height / 2) - 9) + 'px';
		this.className = 'selected';
		
		new Effect.SlideUp($('experience_content'), {
			afterFinish: function(e) {
				new Ajax.Updater($('experience_content'), _this.href, {
					onComplete: function(e) {
						// alert($('experience_content').innerHTML);
						new Effect.SlideDown($('experience_content'));
					}
				});
			}
		});
	});
	
	$$('ul.student_experiences li a.selected').each(function(e) {
		new Element.insert(e, '<img src="images/nuoli.gif" alt="<<" id="nuoli" />', { position: 'before' })
	});
});

