//IE6 Background Color
var ie6BGColor = '#cccccc';

var Slides = {
	navmenu: function(){
		$$('.Menu').each( function(button, i) {
			if($defined($('Sub' + button.id))) {
				$('Sub' + button.id).parentNode.style.top = '26px';
				if(Browser.Engine.trident4){
					$('Sub' + button.id).parentNode.style.width = '150px';	
				}
				var width = 0;
				
				for(c = 0;c < i; c++){
					if(c != i){
						width = width + $$('.Menu')[c].getElement('img').getSize().x;
					}
				}
				
				if(button.get('id') == 6){					
					$('Sub' + button.id).getParent().setStyle('right', 0 + 'px');
				}else{
					$('Sub' + button.id).getParent().setStyle('left', width + 'px');
				}
				
				//$('Sub' + button.id).getParent().setStyle('left', width + 'px');
				
				var myFx = new Fx.Slide($('Sub' + button.id), {duration: 400}).hide();			
				$('Sub' + button.id).onmouseover = function(){
					myFx.cancel();
					myFx.slideIn();
				}
			
				$('Sub' + button.id).onmouseout = function(){
					myFx.cancel();
					myFx.slideOut();
				}
				
				button.onmouseover = function(){
					myFx.cancel();
					myFx.slideIn();	
				}
					
				button.onmouseout = function(){
					myFx.cancel();
					myFx.slideOut();	
				}
			}
		});
	}
}
window.addEvent('domready',function() {
	Slides.navmenu();
});
