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 : 'Notre Mission'
		}).inject(new Element('li').inject(content_include));
		
		new Element('a', {
			href : '/about/themes',
			text : 'Nos thèmes'
		}).inject(new Element('li').inject(content_include));
		
//		new Element('a', {
//			href : '/about/network',
//			text : 'Notre communauté'
//		}).inject(new Element('li').inject(content_include));
		
		new Element('a', {
			href : '/about/policies',
			text : 'Nos politiques'
		}).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 : 'Contactez-nous'
		}).inject(new Element('li').inject(content_include));
		
		heresubnav.adopt(content_include);
		
	}else if($('wa-program')){
		
		new Element('a', {
			href : '/program/fellowships',
			text : 'Prix Trudeau'
		}).inject(new Element('li').inject(content_include));

		new Element('a', {
			href : '/program/scholarships',
			text : 'Bourses'
		}).inject(new Element('li').inject(content_include));
		
		new Element('a', {
			href : '/program/mentorships',
			text : 'Mentorat'
		}).inject(new Element('li').inject(content_include));

		new Element('a', {
			href : '/program/public',
			text : 'Interaction Publique'
		}).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 : 'Archive'
		}).inject(new Element('li').inject(content_include));

//		new Element('a', {
//			href : '/news~2/member',
//			text : 'Autres Nouvelles'
//		}).inject(new Element('li').inject(content_include));
		
		new Element('a', {
			href : '/calendar',
			text : 'Événements'
		}).inject(new Element('li').inject(content_include));
		
		new Element('a', {
			href : '/news~2/ideas',
			text : 'Bulletin'
		}).inject(new Element('li').inject(content_include));
		
		new Element('a', {
			href : '/news~2/newsroom',
			text : 'Dans les médias'
		}).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 : 'Nos Publications'
		}).inject(new Element('li').inject(content_include));
	
		new Element('a', {
			href : '/resource/library',
			text : 'Publications des Membres'
		}).inject(new Element('li').inject(content_include));
	
		new Element('a', {
			href : '/gallery',
			text : 'Galerie photo'
		}).inject(new Element('li').inject(content_include));

		new Element('a', {
			href : '/resource/forms',
			text : 'Formulaires'
		}).inject(new Element('li').inject(content_include));
		
		heresubnav.adopt(content_include);
	
	} else if( $('wa-faq') ){

//		new Element('a', {
//			href : '/faq/public',
//			text : 'En général'
//		}).inject(new Element('li').inject(content_include));
		
		new Element('a', {
			href : '/faq/fellows',
			text : 'Lauréats'
		}).inject(new Element('li').inject(content_include));
		
		new Element('a', {
			href : '/faq/scholars',
			text : 'Boursiers'
		}).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 : 'Interaction Publique'
		}).inject(new Element('li').inject(content_include));
		
//		new Element('a', {
//			href : '/faq/technical',
//			text : 'Questions techniques'
//		}).inject(new Element('li').inject(content_include));
		
		heresubnav.adopt(content_include);

	}
	


});