window.addEvent('domready', function() { // wait for the content
	
	$$('.nav-hidden').setStyle('display','block');
	$$('.hide').setStyle('display','block');
	
	$$('li.slide-down').each(function(el) {
		
		var toShow = el.getChildren('ul');
		var toHighlight = el.getChildren('a');
		
		var slideDown = new Fx.Morph(toShow[0], {
			duration : 250,
			link : 'cancel'			
		});
		slideDown.set({'opacity':'0'});
		
		el.addEvents({
			'mouseenter' : function() {
				toHighlight.toggleClass('active');
				slideDown.start({
					'opacity' : '1'
				});
			},
			'mouseleave' : function() {
				toHighlight.toggleClass('active');
				slideDown.start({
					'opacity' : '0'
				});
			}
		});
	});	
	
	if ($defined($('portfolio'))) {
		var portfolioShow = new Slideshow('portfolio', slide_data, {
			delay: 5000,
			hu: 'img/usr/multi-image/',
			thumbnails: true,
			controller: true,
			height: 300,
			width: 300
		});
	}
	
	var marquee = new mooquee($('mooquee'), {
		marWidth: 290,
		marHeight: 22,
		direction: 'left',
		speed: 15,
		pauseOnOver: false
	});


});

