window.addEvent('domready', function() {
    
	
	
	if ($('calendar')) {
		var heresubnav = $('nav-news2');
		heresubnav.addClass('here');
	 }
	 else if ($('forums')) {
		var heresubnav = $('nav-news2');
		heresubnav.addClass('here');
	 }	
	 else if ($('gallery')) {
		var heresubnav = $('nav-resource');
		heresubnav.addClass('here');
	 }		 
	 else {
		var heresubnav = $('primarynav').getElement('li.here');
	}
	

	var content_include = new Element('ul');
	
	if($('wa-about')){
		new Element('a', {
			href : '/about/mission',
			text : 'Our Mission'
		}).inject(new Element('li').inject(content_include));
		
		new Element('a', {
			href : '/about/themes',
			text : 'Our Themes'
		}).inject(new Element('li').inject(content_include));
		
//		new Element('a', {
//			href : '/about/network',
//			text : 'Our Community'
//		}).inject(new Element('li').inject(content_include));
		
		new Element('a', {
			href : '/about/policies',
			text : 'Our Policies'
		}).inject(new Element('li').inject(content_include));
		
		new Element('a', {
			href : '/about/pet',
			text : 'P. E. Trudeau'
		}).inject(new Element('li').inject(content_include));
		
		new Element('a', {
			href : '/about/contact',
			text : 'Contact Us'
		}).inject(new Element('li').inject(content_include));
		
		heresubnav.adopt(content_include);
		
	}else if($('wa-program')){
	
		new Element('a', {
			href : '/program/fellowships',
			text : 'Fellowships'
		}).inject(new Element('li').inject(content_include));

		new Element('a', {
			href : '/program/scholarships',
			text : 'Scholarships'
		}).inject(new Element('li').inject(content_include));
		
		new Element('a', {
			href : '/program/mentorships',
			text : 'Mentorships'
		}).inject(new Element('li').inject(content_include));

		new Element('a', {
			href : '/program/public',
			text : 'Public Interaction'
		}).inject(new Element('li').inject(content_include));
		
		heresubnav.adopt(content_include);
		
	}else if($('wa-news2') || $('calendar') || $('forums') ){

		
		new Element('a', {
			href : '/news~2/news',
			text : 'News Archive'
		}).inject(new Element('li').inject(content_include));

//		new Element('a', {
//			href : '/news~2/member',
//			text : 'Other News'
//		}).inject(new Element('li').inject(content_include));
		
		new Element('a', {
			href : '/calendar',
			text : 'Events'
		}).inject(new Element('li').inject(content_include));
		
//		new Element('a', {
//			href : '/news~2/ideas',
//			text : 'Newsletter'
//		}).inject(new Element('li').inject(content_include));
		
		new Element('a', {
			href : '/news~2/newsroom',
			text : 'In The Media'
		}).inject(new Element('li').inject(content_include));
		
		new Element('a', {
			href : '/forums',
			text : 'Forums'
		}).inject(new Element('li').inject(content_include));
		
		heresubnav.adopt(content_include);

	} else if( $('wa-resource') || $('gallery') ){
	
		new Element('a', {
			href : '/resource/public',
			text : 'Our Publications'
		}).inject(new Element('li').inject(content_include));
	
		new Element('a', {
			href : '/resource/library',
			text : 'Members Publications'
		}).inject(new Element('li').inject(content_include));
	
		new Element('a', {
			href : '/gallery',
			text : 'Photo Gallery'
		}).inject(new Element('li').inject(content_include));

		new Element('a', {
			href : '/resource/forms',
			text : 'Forms'
		}).inject(new Element('li').inject(content_include));
		
		heresubnav.adopt(content_include);
	
	} else if( $('wa-faq') ){

//		new Element('a', {
//			href : '/faq/public',
//			text : 'General'
//		}).inject(new Element('li').inject(content_include));
		
		new Element('a', {
			href : '/faq/fellows',
			text : 'Fellows'
		}).inject(new Element('li').inject(content_include));
		
		new Element('a', {
			href : '/faq/scholars',
			text : 'Scholars'
		}).inject(new Element('li').inject(content_include));
		
		new Element('a', {
			href : '/faq/mentors',
			text : 'Mentors'
		}).inject(new Element('li').inject(content_include));
		
		new Element('a', {
			href : '/faq/publicinteraction',
			text : 'Public Interaction'
		}).inject(new Element('li').inject(content_include));
		
//		new Element('a', {
//			href : '/faq/technical',
//			text : 'Technical'
//		}).inject(new Element('li').inject(content_include));
		
		heresubnav.adopt(content_include);

	}
	


});