YAHOO.util.Event.onContentReady("nav", function () {

	var siteRoot = "http://www.caper.ca/";



    var oMenu = new YAHOO.widget.Menu(

        "nav", {

            position: "static", 

            hidedelay: 500, 

            lazyload: true,

            effect: { 

                effect: YAHOO.widget.ContainerEffect.FADE,

                duration: 0.25

            } 

        }

    );

   

    var aSubmenuData = [{

        id: "nav_about", 

        itemdata: [ 

            { text: "CAPER", url: siteRoot + "about_about_caper_fr.php" },

            { text: "Comit&eacute; des politiques de CAPER", url: siteRoot + "about_policy_committee_fr.php" },

            { text: "Personnel de CAPER", url: siteRoot + "about_caper_staff_fr.php" },

			{ text: "Pour communiquer avec CAPER", url: siteRoot + "about_contact_fr.php" },

            { text: "Protocole de partage des donn&eacute;es", url: siteRoot + "about_sharing_checklist_fr.php" },

			{ text: "Politique de confidentialit&eacute;, 2009", url: siteRoot + "about_privacy_policy_fr.php" },

            { text: "Achat de documents", url: siteRoot + "about_purchase_documents_fr.php" },

			{ text: "Utilisation de la base de donn&eacute;es de CAPER", url: siteRoot + "about_using_database_fr.php" }

        ]},{ 

		id: "nav_publications", 

        itemdata: [
				   
			{ text: "Annuaire de recensement de CAPER", url: siteRoot + "download_census_publications_fr.php" },	
			
			{ text: "Tableaux et fiches de spécialité individuelle de CAPER", url: siteRoot + "download_specialty_tables_overviews_publications_fr.php" },
			
			{ text: "Rapports annuels provinciaux/territoriaux de CAPER", url: siteRoot + "download_provreport_publications_fr.php" },		
			
			{ text: "Rapport de la base de données nationale sur les DIM", url: siteRoot + "download_IMGreport_publications_fr.php" },				

			{ text: "Manuels de codification de CAPER", url: siteRoot + "download_codingmanual_publications_fr.php" },																											

		]},{ 

		id: "nav_img", 

        itemdata: [

			{ text: "DIM Aper&ccedil;u du projet de base de donn&eacute;es", url: siteRoot + "img_database_project_overview_fr.php" },

			{ text: "DIM Liens", url: siteRoot + "img_links_fr.php" },

			{ text: "DIM Communications", url: siteRoot + "img_papers_fr.php" },

			{ text: "DIM Donn&eacute;es", url: siteRoot + "img_data_fr.php" },

			{ text: "DIM Compte Rendu", url: siteRoot + "img_proceedings_fr.php" },

			{ text: "DIM Brochure/Séance d'affichage", url: siteRoot + "img_brochure_fr.php" },
			
			{ text: "National IMG Database Report 2005-2007 (31.8 MB)", url: siteRoot + "docs/pdf_2005_2009_img_dbase_report.pdf" },
			
			{ text: "National IMG Database Report 2005-2009 (25.5 MB)", url: siteRoot + "docs/pdf_2005_2009(1)_img_dbase_report.pdf" },

		]},{ 

		id: "nav_data", 

        itemdata: [
			{ text: "Annuaire de recensement de CAPER 2010-2011", url: siteRoot + "census_book_2011/toc_en.php" },
		
			{ text: "Annuaire de recensement de CAPER 2009-2010", url: siteRoot + "census_book_2010/toc_en.php" },
			
			{ text: "Annuaire de recensement de CAPER 2008-2009", url: siteRoot + "census_book_2009/toc_en.php" },

			{ text: "Annuaire de recensement de CAPER 2007-2008", url: siteRoot + "census_book_2008/toc_en.php" },

			{ text: "Annuaire de recensement de CAPER 2006-2007", url: siteRoot + "census_book_2007/toc_en.php" },

			{ text: "Annuaire de recensement de CAPER 2005-2006", url: siteRoot + "census_book_2006/toc_en.php" },

			{ text: "Annuaire de recensement de CAPER 2004-2005", url: siteRoot + "census_book_2005/toc_en.php" },
			{ text: "Points saillants 2010-2011", url: siteRoot + "docs/pdf_quickfacts_2010_2011.pdf" },
			
			{ text: "Points saillants 2009-2010", url: siteRoot + "docs/pdf_quickfacts_2009_2010.pdf" },
			
			{ text: "Points saillants 2008-2009", url: siteRoot + "docs/pdf_quickfacts_2008_2009.pdf" },

			{ text: "Points saillants 2007-2008", url: siteRoot + "docs/pdf_quickfacts_2007_2008.pdf" },

			{ text: "Points saillants 2006-2007", url: siteRoot + "docs/pdf_quickfacts_2006_2007.pdf" },

			{ text: "Points saillants 2005-2006", url: siteRoot + "docs/pdf_quickfacts_2005_2006.pdf" },

			{ text: "Points saillants 2004-2005", url: siteRoot + "docs/pdf_quickfacts_2004_2005.pdf" },			

		]},{ 

		id: "nav_links", 

        itemdata: [

			{ text: "Organisations participantes", url: siteRoot + "links_participating_organizations_fr.php" },

			{ text: "Autres organisations importantes", url: siteRoot + "links_other_fr.php" },

		]} 

    ];

	

    // Subscribe to the Menu instance's "beforeRender" event

	oMenu.subscribe("beforeRender", function () {

		if (this.getRoot() == this) {

			this.getItem(1).cfg.setProperty("submenu", aSubmenuData[0]);

			this.getItem(2).cfg.setProperty("submenu", aSubmenuData[1]);

			this.getItem(3).cfg.setProperty("submenu", aSubmenuData[2]);

			this.getItem(4).cfg.setProperty("submenu", aSubmenuData[3]);

			this.getItem(6).cfg.setProperty("submenu", aSubmenuData[4]);

		}

	});



    /* Call the "render" method with no arguments since the 

       markup for this Menu instance is already exists in the page. */

	oMenu.render();

            

});


