var menus = {};

var addMenuData = function(label, id, uri, off) {
	var menu = new Array();
	menu.label = label;
	menu.id = id;
	menu.uri = uri;
	menu.off = off;
	menu.menuItems = new Array();
	return menu;	
}

var addMenuItemData = function(label, uri) {
	var menuItem = new Array();
	menuItem.label = label;
	menuItem.uri = uri;
	return menuItem;
}

var ref = '';

menus['My Redfin'] = addMenuData('My Redfin', 'myRedfin', '/stingray/do/my-redfin', '1');
menus['My Redfin'].push(addMenuItemData('Favorites', '/stingray/do/my-favorite-listings'));
menus['My Redfin'].push(addMenuItemData('Notes &amp; Photos', '/stingray/do/my-notes'));
menus['My Redfin'].push(addMenuItemData('Saved Searches', '/stingray/do/view-saved-searches'));
menus['My Redfin'].push(addMenuItemData('Home Tours', '/myredfin/tours'));
menus['My Redfin'].push(addMenuItemData('Offers', '/stingray/do/my-offers'));
menus['My Redfin'].push(addMenuItemData('Listings', '/myredfin/listings/'));
menus['My Redfin'].push(addMenuItemData('Account Settings', '/stingray/do/my-redfin-acct-update'));
menus['My Redfin'].push(addMenuItemData('Help', '/help'));

menus['Forums'] = addMenuData('Forums', 'forums', 'http://forums.redfin.com/', 0);
menus['Forums'].push(addMenuItemData('Boston', 'http://forums.redfin.com/rf/board?board.id=Boston'));
menus['Forums'].push(addMenuItemData('Chicago', 'http://forums.redfin.com/rf/board?board.id=Chicago'));
menus['Forums'].push(addMenuItemData('Inland Empire', 'http://forums.redfin.com/rf/board?board.id=InlandEmpire'));
menus['Forums'].push(addMenuItemData('Los Angeles', 'http://forums.redfin.com/rf/board?board.id=LA_OC'));
menus['Forums'].push(addMenuItemData('New York', 'http://forums.redfin.com/rf/board?board.id=NewYork'));
menus['Forums'].push(addMenuItemData('Orange County', 'http://forums.redfin.com/rf/board?board.id=OrangeCounty'));
menus['Forums'].push(addMenuItemData('Sacramento', 'http://forums.redfin.com/rf/board?board.id=Sacramento'));
menus['Forums'].push(addMenuItemData('San Diego', 'http://forums.redfin.com/rf/board?board.id=SanDiego'));
menus['Forums'].push(addMenuItemData('Seattle', 'http://forums.redfin.com/rf/board?board.id=Seattle'));
menus['Forums'].push(addMenuItemData('Bay Area', 'http://forums.redfin.com/rf/board?board.id=BayArea'));
menus['Forums'].push(addMenuItemData('Washington, DC', 'http://forums.redfin.com/rf/board?board.id=DC'));
menus['Forums'].push(addMenuItemData('Mortgages', 'http://forums.redfin.com/rf/board?board.id=Mortgages'));
menus['Forums'].push(addMenuItemData('Sellers', 'http://forums.redfin.com/rf/board?board.id=sellers'));
menus['Forums'].push(addMenuItemData('Real Estate Scientist', 'http://forums.redfin.com/rf/board?board.id=RealEstateScientist'));
menus['Forums'].push(addMenuItemData('Website Q&amp;A', 'http://forums.redfin.com/rf/board?board.id=SiteQuestions'));
menus['Forums'].push(addMenuItemData('Real Estate Glossary', '/real-estate-glossary'));

menus['Sell'] = addMenuData('Sell', 'sell', '/sell-a-home/introduction', '0');
menus['Sell'].push(addMenuItemData('Listing With Redfin', '/sell-a-home/introduction'));
menus['Sell'].push(addMenuItemData('How It Works', '/sell-a-home/how-it-works'));
menus['Sell'].push(addMenuItemData('Service Options', '/sell-a-home/service-options'));
menus['Sell'].push(addMenuItemData('Why Redfin Is Way Better', '/sell-a-home/why-redfin-is-way-better'));
menus['Sell'].push(addMenuItemData('Flat-Fees and Commissions', '/sell-a-home/flat-fees-and-commissions'));
menus['Sell'].push(addMenuItemData('Marketing Your Listing', '/sell-a-home/marketing-your-listing'));
menus['Sell'].push(addMenuItemData('Redfin Agents', '/sell-a-home/real-estate-agents'));
menus['Sell'].push(addMenuItemData('Redfin Partner Agents', '/sell-a-home/redfin-partner-agents'));
menus['Sell'].push(addMenuItemData('Redfin Customers', '/sell-a-home/customers'));
menus['Sell'].push(addMenuItemData('Redfin &amp; Other Agents', '/sell-a-home/redfin-and-other-agents'));
menus['Sell'].push(addMenuItemData('Real Estate Glossary', '/real-estate-glossary'));

menus['Buy'] = addMenuData('Buy', 'buy', '/buy-a-home/why-redfins-better', '0');
menus['Buy'].push(addMenuItemData('Why Redfin Is Way Better', '/buy-a-home/why-redfins-better'));
menus['Buy'].push(addMenuItemData('Side-By-Side Comparison', '/buy-a-home/how-redfin-is-different'));
menus['Buy'].push(addMenuItemData('How It Works', '/buy-a-home/how-it-works'));
menus['Buy'].push(addMenuItemData('Share the Commission', '/buy-a-home/share-the-commission'));
menus['Buy'].push(addMenuItemData('Getting Started', '/buy-a-home/getting-started'));
menus['Buy'].push(addMenuItemData('Home Buying Class', '/buy-a-home/home-buying-class'));
menus['Buy'].push(addMenuItemData('Financing Your Home', '/buy-a-home/financing-your-home'));
menus['Buy'].push(addMenuItemData('Redfin Agents', '/buy-a-home/real-estate-agents'));
menus['Buy'].push(addMenuItemData('Redfin Partner Agents', '/buy-a-home/redfin-partner-agents'));
menus['Buy'].push(addMenuItemData('Redfin Customers', '/buy-a-home/redfin-customers'));
menus['Buy'].push(addMenuItemData('The Redfin Advantage', '/buy-a-home/the-redfin-advantage'));
menus['Buy'].push(addMenuItemData('Real Estate Glossary', '/real-estate-glossary'));

menus['Agents'] = addMenuData('Agents', 'agents', '/real-estate-agents', '0');
menus['Agents'].push(addMenuItemData('Our Real Estate Agents', '/real-estate-agents'));
menus['Agents'].push(addMenuItemData('California - Bay Area', '/real-estate-agents/northern-california'));
menus['Agents'].push(addMenuItemData('California - Sacramento', '/real-estate-agents/sacramento'));
menus['Agents'].push(addMenuItemData('California - Southern', '/real-estate-agents/southern-california'));
menus['Agents'].push(addMenuItemData('District of Columbia', '/real-estate-agents/washington-dc/dc'));
menus['Agents'].push(addMenuItemData('Illinois', '/real-estate-agents/illinois'));
menus['Agents'].push(addMenuItemData('Maryland', '/real-estate-agents/maryland'));
menus['Agents'].push(addMenuItemData('Massachusetts', '/real-estate-agents/massachusetts'));
menus['Agents'].push(addMenuItemData('New York', '/real-estate-agents/new-york'));
menus['Agents'].push(addMenuItemData('Virginia', '/real-estate-agents/virginia'));
menus['Agents'].push(addMenuItemData('Washington State', '/real-estate-agents/washington'));