/* height formula: h = (n * 15) + 13 + 13

   n  = number of menu items 
   15 = line height of each menu item
   13 = height of the menu's top image
   13 = height of the menu's bottom image
*/

var menuData =
{
	'menus': {
		'about': {
			'height':186,
			'width':130,
			'trigger':'aboutBtn',
			'offsetX':-5,
			'offsetY':0,
			'direction': 'down',
			'items':[ {type: 'link', text: '', href: '#'},
					  {type: 'link', text: 'Becoming A Member', href: '/about/becomingamember.php'},
					  {type: 'link', text: 'Credit Union at Work', href: '/about/cu-at-work.php'}, 
					  {type: 'link', text: 'Hours Locations', href: '/contact/locations.php'},
					  {type: 'link', text: 'News &amp; Events', href: '/about/news/index.php'},
					  {type: 'link', text: 'Board of Directors', href: '/about/boardofdirectors.php'},
					  {type: 'link', text: 'History', href: '/about/history.php'},
					  {type: 'link', text: 'Your Privacy', href: '/personal/yourprivacy.php'},
					  {type: 'link', text: 'Careers at MVFCU', href: '/about/careers/index.php'},
					  {type: 'link', text: 'Schedule of Fees', href: '/about/scheduleoffees.php'}
					] 
				},
				'mvatheart': {
			'height':86,
			'width':150,
			'trigger':'mvatheartBtn',
			'offsetX':-25,
			'offsetY':0,
			'direction': 'down',
			'items':[ {type: 'link', text: '', href: '#'},
					  {type: 'link', text: 'MVFCU Charities', href: '/mvatheart/charities.php'},
					  {type: 'link', text: 'Emmaus Inc.', href: '/mvatheart/emmaus.php'},
					  {type: 'link', text: 'Merrimack Valley YMCA', href: '/mvatheart/ymca.php'},
					  {type: 'link', text: 'Events', href: '/mvatheart/events.php'}
					] 
				},
		'personalbanking': {
			'height':270,
			'width':150,
			'trigger':'personalbankingBtn',
			'offsetX':-20,
			'offsetY':0,
			'direction': 'down',
			'items':[ {type: 'link', text: '', href: '#'},
					  {type: 'link', text: 'Personal Checking', href: '/personal/checking.php'},
					  {type: 'link', text: 'Personal Savings', href: '/personal/savings.php'},
					  {type: 'link', text: 'Certificates and IRAs', href: '/personal/cd.php'},
					  {type: 'link', text: 'MV Financial Services', href: '/personal/investments.php'},
					  {type: 'link', text: 'MV Online Banking', href: '/personal/online_banking.php'},
					  {type: 'link', text: 'MV BillPay', href: '/personal/billpay.php'},
					  {type: 'link', text: 'Convenience Services', href: '/personal/other_services.php'},
					  {type: 'link', text: 'Deposit Rates', href: '/rates/deposit_rates.asp'},
					  {type: 'link', text: 'Insurance', href: '/personal/insurance.php'},
					  {type: 'link', text: 'Smart Student Package', href: '/personal/smartstudent.php'},
					  {type: 'link', text: 'Identity Theft Shield', href: '/personal/identitytheftshield.php'},
					  {type: 'link', text: 'Family Security Plan&#174;', href: '/personal/familySecurity.php'}
					  
					] 
				},
        'personallending': {
			'height':220,
			'width':140,
			'trigger':'personallendingBtn',
			'offsetX':-20,
			'offsetY':0,
			'direction': 'down',
			'items':[ {type: 'link', text: '', href: '#'},
					  {type: 'link', text: 'Auto', href: '/personal_lending/auto.php'},
					  {type: 'link', text: 'Personal', href: '/personal_lending/personal.php'},
					  {type: 'link', text: 'Equity', href: '/personal_lending/equity.php'},
					  {type: 'link', text: 'Visa', href: '/personal_lending/creditcc.php'},
					 // {type: 'link', text: 'College Payway', href: '/personal_lending/collegepayway.php'},
					  {type: 'link', text: 'Loan Rates', href: '/rates/loan_rates.asp'}
					]
				},
        'mvonline': {
			'height':129,
			'width':160,
			'trigger':'mvonlineBtn',
			'offsetX':-40,
			'offsetY':0,
			'direction': 'down',
			'items':[ {type: 'link', text: '', href: '#'},
					  {type: 'link', text: 'MV Online Banking', href: '/mvonline/onlinebanking.php'},
					  {type: 'link', text: 'MV Online Log-on', href: 'https://www.memberconnectweb.com/cgi-bin/mcw282.cgi?MCWSTART'},
					  {type: 'link', text: 'MV BillPay', href: '/mvonline/billpay.php'},
					  {type: 'link', text: 'MV eStatements', href: '/mvonline/estatements.php'},
					  {type: 'link', text: 'Visa Online Access', href: '/mvonline/visaonline.php'},
					  {type: 'link', text: 'Cross Account Transfer Form', href: '/mvonline/transfer.php'}
					
					]
				},
		'homecenter': {
			'height':140,
			'width':138,
			'trigger':'homecenterBtn',
			'offsetX':-25,
			'offsetY':0,
			'direction': 'down',
			'items':[ {type: 'link', text: '', href: '#'},
					  {type: 'link', text: 'Apply Now', href: '/homecenter/applynow.php'},
					  {type: 'link', text: 'Mortgage Rates', href: '/rates/mortgage_rates.asp'},
					  {type: 'link', text: 'Buying your Home', href: '/homecenter/buyinghome.php'},
					  {type: 'link', text: 'Refinancing Your Home', href: '/homecenter/refiancing.php'},
					  {type: 'link', text: 'Mortgage Programs', href: '/homecenter/mortgageprograms.php'},
					  {type: 'link', text: 'Home Buyers FAQ', href: '/contact/faq.php#mortgage'},
					  {type: 'link', text: 'The Home Team', href: '/homecenter/hometeam.php'}
					] 
				},
			'business': {
			'height':129,
			'width':150,
			'trigger':'businessBtn',
			'offsetX':-45,
			'offsetY':0,
			'direction': 'down',
			'items':[ {type: 'link', text: '', href: '#'},
					  {type: 'link', text: 'Deposit Services', href: '/business/deposit_services.php'},
					  {type: 'link', text: 'Lending Services', href: '/business/lending_services.php'},
					  {type: 'link', text: 'Convenience Services', href: '/business/convenience_services.php'}
					] 
				}
			},
	'nomenus': ['loginBtn']
}

var menuObj = new menuObject(menuData)
menuObj.isSupported = function () {
	var ret = false
	// set a baseline that includes DOM-capable browsers and MSIE
	if (browser.isDOM1 || document.all) {
		ret = true
	}
	// now, disinclude browsers that match above rule, but are known to be wonky
	if (browser.isOpera && (browser.versionMajor < 6)) {
		ret = false
	}
	return ret
}
