// JavaScript Document

var fundSwitch = new Object;

function aal_fund_toggle_on(dropdown, arrow) {
	

		dropdown.css({'position':'absolute'});
		dropdown.css({'z-index':'5'});
		dropdown.css({'height':'70'});
		dropdown.css({'overflow':'hidden'});
		arrow.css({'display':'none'});
		fundSwitch.on = true;
}

function aal_fund_toggle_off(dropdown, arrow) {
	
	
	dropdown.scrollTop(0);
	dropdown.css({'z-index':'1'});
	dropdown.css({'height':'28'});
	dropdown.css({'overflow':'hidden'});
	arrow.css({'display':'inline'});

	fundSwitch.on = false;
	

}

$(document).ready(function(){
						   
	var dropdown = $("div#account-access-right div.container");
	var arrow = $("div#account-access-right img.arrow");
	
	
						   
	dropdown.click(function() {
		if (fundSwitch.on != true) {
			aal_fund_toggle_on(dropdown, arrow);
		} else {
			aal_fund_toggle_off(dropdown, arrow);
		}
	});
	
	dropdown.hover(function() {
	
	   },
	   function() {
			aal_fund_toggle_off(dropdown, arrow);
	   }
	);
	
	$(window).resize(function() {
			
			if (fundSwitch.on == true) {
				aal_fund_toggle_on(dropdown, arrow);
			}
					 
	});
	
});
