
function attachMochaLinkEvents(){

	// My Account
	if ($('accountDetailsLink')){
		$('accountDetailsLink').addEvent('click', function(e){
			new Event(e).stop();
			document.mochaUI.newWindow({
				id: 'account',
				title: 'Account Information',
				loadMethod: 'iframe',
				contentURL: 'pages/general.php?nav=companies',
				maximizable: false,
				resizable: false,
				x: 20,
				y: 85,
				width: 520,
				height: 300
			});
		});
	}

	if ($('subsUrlLink')){
		$('subsUrlLink').addEvent('click', function(e){
			new Event(e).stop();
			document.mochaUI.newWindow({
				id: 'urls',
				title: 'Subscription Details',
				loadMethod: 'iframe',
				contentURL: 'pages/general.php?nav=urls',
				maximizable: false,
				resizable: false,
				x: 80,
				y: 200,
				width: 720,
				height: 380
			});
		});
	}

	// Reports
	if ($('subsLink')){
		$('subsLink').addEvent('click', function(e){
			new Event(e).stop();
			document.mochaUI.newWindow({
				id: 'subscribers',
				title: 'Reports (Subscribers)',
				loadMethod: 'iframe',
				contentURL: 'pages/reports.php?nav=subscribers',
				maximizable: false,
				resizable: false,
				y:85,
				width: 600,
				height: 300
			});
		});
	}

	if ($('jobsLink')){
		$('jobsLink').addEvent('click', function(e){
			new Event(e).stop();
			document.mochaUI.newWindow({
				id: 'jobs',
				title: 'Reporting (Campaigns)',
				loadMethod: 'iframe',
				contentURL: 'pages/reports.php?nav=jobs',
				maximizable: false,
				resizable: false,
				y:200,
				width: 500,
				height: 300
			});
		});
	}

	// Help
	if ($('supportLink')){
		$('supportLink').addEvent('click', function(e){
			new Event(e).stop();
			document.mochaUI.newWindow({
				id: 'support',
				title: 'Support',
				loadMethod: 'xhr',
				contentURL: 'pages/support.php',
				modal: true,
				width: 300,
				height: 150
			});
		});
	}

	if ($('aboutLink')){
		$('aboutLink').addEvent('click', function(e){
			new Event(e).stop();
			document.mochaUI.newWindow({
				id: 'about',
				title: 'About',
				loadMethod: 'xhr',
				contentURL: 'pages/about.html',
				modal: true,
				width: 300,
				height: 150
			});
		});
	}

	// Deactivate menu header links
	$$('a.returnFalse').each(function(el){
		el.addEvent('click', function(e){
			new Event(e).stop();
		});
	});

}