/**
 * Handles Sitemap Groups behaviour
 *
 * @author Norbert
 * @since 20090116
 */

window.addEvent('domready', function(){
	
	
	//$('navigationSection').set({opacity:0});
	//$('navigationSection').set({display:'block'});

	//var trigger = $('navigationTrigger');
	
	//if ($defined(trigger)){
	//	trigger.addEvent('click', function(){
	//		$('navigationSection').fade(1);
	//	});
	//}
	
	
	$$('#naviButtons a').each(function(item){
		
		item.addEvent('mousedown', function(){
			
			// Current Group
			var group = this.rel;
			
			// Prevent Outline of Buttons
			this.setStyle('outline', 'none');
			
			// Reset all Trigger activation
			$$('#naviButtons a').removeClass('active');
			
			// Active State Trigger
			this.addClass('active');
			
			// Reset all activation
			$$('#navigationContent .links li a').removeClass('active');
			
			// Activate Group Links
			$$('#navigationContent .links li.' + group + ' a').addClass('active');
			
		})
	})
})


document.addEvent('keydown',function(evt){
		evt = new Event(evt); 
		if (evt.key == "right") document.location.href = $$('.gilr')[0].href;
		else if  (evt.key == "left") history.back();
})

