function playbackComplete() {
	animateMenu();
}

function animateMenu() {
	
	var time = 0;
	$('nav').getElements('a').each(function(link) {
		setTimeout(function() {
			link.getElement('img.icon').morph({bottom:40});
			link.getElement('img.reflection').morph({top:68});
		}, time += 100);
		setTimeout(function() {
			link.getElement('img.icon').morph({bottom:36});
			link.getElement('img.reflection').morph({top:64});
		}, time + 400);
	});
}

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

	//neat menu effecthings
	$('nav').getElements('img').set('morph', {duration: 400, transition: Fx.Transitions.Bounce.easeOut});
	$('nav').getElements('a').addEvents({
		'mouseenter': function() {
			this.getElement('img.icon').morph({bottom:40});
			this.getElement('img.reflection').morph({top:68});
		},
		'mouseleave': function() {
			this.getElement('img.icon').morph({bottom:36});
			this.getElement('img.reflection').morph({top:64});
		}
	});
	
	
	$$('a').each(function(a) {
		var rgx = new RegExp("^" + a.href);
		if(rgx.test(location.href)) {
			a.addClass("hl");
		}
	})
});

