var boxes = new Array("off_left2", "off_right2", "off_bottom2");

function shift(ele)
{
		var myEffects = new Fx.Styles(ele, {duration: 10, transition: Fx.Transitions.linear});
		myEffects.start({
		'padding-left': [$(ele).getStyle('padding-left'), '22px'],
		'width': '165px',
		color: '#66ccff'
	});
}
function shiftback(ele)
{
		var myEffects = new Fx.Styles(ele, {duration: 10, transition: Fx.Transitions.linear});
		myEffects.start({
		'padding-left': 17,
		'width': '170px',
		'color': '#696660'
	});
}

function show_boxes(){
	for (var x = 0; x < boxes.length; x++)	
		$(boxes[x]).setStyle('display','block');
}
function hide_boxes(){
	for (var x = 0; x < boxes.length; x++)
		$(boxes[x]).setStyle('display','none');
}

var Drop = new Class({
	 	initialize: function(){
			this.A = new Array('accnav_drop_televisions', 'accnav_drop_bus_building', 'accnav_drop_appliance_parts_motors');
		},
	 	masthead_slide: function (sId) {
	
			//sets element to visible
			if($(sId).getStyle('display') == 'none')
			{
				$(sId).setStyle('display','block');

				//initializes mootools Fx.Height object
				var open = new Fx.Height($(sId), {duration: 250});
					
				//drops down the menu
				open.toggle(); 
			
				//function to close out all other menus
				this.masthead_slide_out_all(sId);
			}
	
		},
		 	masthead_slide_out_all: function(sId2){
		
			var x = 0;
		
			for (var x = 0; x < this.A.length; x++)
			{
				
				if(sId2 != this.A[x])	{
				$(this.A[x]).setStyle('display','none');
				var close = new Fx.Height($(this.A[x]), {wait:false});
				
				//closes the menu
				close.hide(); 
				}
				
			}
		},
		 	masthead_slide_out_all_noarg: function(){
			var x = 0;
			for (var x = 0; x < this.A.length; x++)
			{
				
				$(this.A[x]).setStyle('display','none');
				var close = new Fx.Height($(this.A[x]), {wait:false});
				close.hide(); 
		}
	}
});

var DropDown = new Drop();
