
function menu_object() {
	this['equity'] = 'opened';
	this['balanced'] = 'opened';
	this['alternative'] = 'opened';
	this['fixed'] = 'opened';

	if ($.browser.msie) { 
		this['display_type'] = 'block';
	} else if ($.browser.mozilla) {
		this['display_type'] = 'table-row';
	} else {
		this['display_type'] = 'table-row';
	}
	

	return this;
}

function hover_fund(fund) {
	var header_row = 'tr#' + fund;
	var image = 'img#arrow-' + fund;
	$(header_row).css({"background-color":"#bd5527"});
}

function blur_fund(fund) {
	var header_row = 'tr#' + fund;
	var image = 'img#arrow-' + fund;
	$(header_row).css({"background-color":"#1b5691"});
}

function toggle_fund(fund) {
	var data_row = 'tr.' + fund + '-data';
	var image = 'img#arrow-' + fund;
	if(menu[fund] == 'opened') {
		$(data_row).css({"display":"none"});
		$(image).attr("src", "/inc/html/managers/pix2/fund_btn_white_closed.png");
	} else {
		$(data_row).css({"display":menu['display_type']});
		$(image).attr("src", "/inc/html/managers/pix2/fund_btn_white_opened.png");
	}
	menu[fund] = (menu[fund] == 'opened' ? 'closed' : 'opened');
}

function init() {
	var funds = new Array('equity', 'balanced', 'alternative', 'fixed');
	for (var fund in funds) {
		toggle_fund(funds[fund]);
	}
}



$(document).ready(function(){
				
	menu = new menu_object();
	init();
				
});
