/* *****************************************************
Forums and Blogs Quick Links -  Lists dropdown menus 
that appear when rolling over the 'our blogs'
or 'our forums' links at the header of the site. 

****************************************************** */


    YAHOO.util.Event.onContentReady("blogsandforums", function () {

	var oMenuBar = new YAHOO.widget.MenuBar("blogsandforums", { 
					autosubmenudisplay: true, 
					hidedelay: 750, 
					lazyload: true });

	var aSubmenuData = [
	    {
		id: "blogs", 
		itemdata: [ 
		    { text: "Adoption", url: "http://adoption.families.com/blog/" },
		    { text: "at Home", url: "http://home.families.com/blog/" },
		    { text: "Baby", url: "http://baby.families.com/blog/" },
		    { text: "Deals", url: "http://dealsblog.families.com/blog/" },
		    { text: "Education", url: "http://education.families.com/blog/" },							
			{ text: "Family Fun", 
				submenu: { 
				    id: "family", 
				    itemdata: [
						{ text: "Disney Travel (unofficial)", url: "http://disney.families.com/blog/" },
						{ text: "Family Travel", url: "http://travel.families.com/blog/" },
						{ text: "Fun Stuff",  url: "http://fun.families.com/blog/" },
						{ text: "Photography (for scrapbooks)",  url: "http://photography.families.com/blog/" },
						{ text: "Scrapbooking", url: "http://scrapbooking.families.com/blog/" }
				    ] 
				}                            
		    },                             
			{ text: "Fathers", url: "http://fatherhood.families.com/blog/" },
		    { text: "Fitness", url: "http://fitness.families.com/blog/" },
		    { text: "Food", url: "http://food.families.com/blog/" },
		    { text: "Frugal", url: "http://frugal.families.com/blog/" },
			{ text: "Genealogy", url: "http://genealogy.families.com/blog/" },
			{ text: "Green Living", url: "http://green-living.families.com/blog/" },
			{ text: "Health", url: "http://health.families.com/blog/" },
		    { text: "Home Schooling", url: "http://homeschooling.families.com/blog/" },
		    { text: "Marriage", url: "http://marriage.families.com/blog/" },
		    { text: "Media Reviews", url: "http://media.families.com/blog/" },
		    { text: "Mental Health", url: "http://mental-health.families.com/blog/" },
			{ text: "Parents", url: "http://parenting.families.com/blog/" },
		    { text: "Pets", url: "http://pets.families.com/blog/" },
		    { text: "Pop Culture", url: "http://pop-culture.families.com/blog/" },
		    { text: "Pregnancy", url: "http://pregnancy.families.com/blog/" },    
			{ text: "Preschool", url: "http://pre-school.families.com/blog/" },    
			{ text: "Religion", 
				submenu: { 
				    id: "religion", 
				    itemdata: [
						{ text: "Christian Family", url: "http://christian.families.com/blog/" },
						{ text: "Jewish Family", url: "http://jewish.families.com/blog/" },
						{ text: "LDS Family",  url: "http://lds.families.com/blog/" },
						{ text: "Muslim Family", url: "http://muslim.families.com/blog/" }
				    ] 
				}
		    
		    }, 							
			{ text: "Single Parents", url: "http://single-parenting.families.com/blog/" },
		    { text: "Special-Needs Children", url: "http://special-needs.families.com/blog/" },
			{ text: "Toddlers", url: "http://toddlers.families.com/blog/" },
		    { text: "Weight Loss", url: "http://weight-loss.families.com/blog/" } ,
			{ text: "Yoga", url: "http://yoga.families.com/blog/" } ,
			{ text: "-------------------------------", url: "#" },
			
			{ text: "New Blogs", 
				submenu: { 
				    id: "new", 
				    itemdata: [
						{ text: "Genealogy", url: "http://genealogy.families.com/blog/" },
						{ text: "Toddlers", url: "http://toddlers.families.com/blog/" },
						{ text: "pre-school",  url: "http://marriage.families.com/blog/" },
						{ text: "Yoga", url: "http://yoga.families.com/blog/" },
						{ text: "green-living", url: "http://green-living.families.com/blog/" }
				    ] 
				}
		    
		    }, 		

			{ text: "Most Popular Blogs", 
				submenu: { 
				    id: "popular", 
				    itemdata: [
						{ text: "Deals", url: "http://dealsblog.families.com/blog/" },
						{ text: "Frugal", url: "http://frugal.families.com/blog/" },
						{ text: "Marriage",  url: "http://marriage.families.com/blog/" },
						{ text: "Mental Health", url: "http://mental-health.families.com/blog/" },
						{ text: "Parenting", url: "http://parenting.families.com/blog/" },
						{ text: "Pregnancy", url: "http://pregnancy.families.com/blog/" },
						{ text: "Weightloss",  url: "http://weightloss.families.com/blog/" }
				    ] 
				}
		    
		    }, 		
			{ text: "Discontinued Blogs", 
				submenu: { 
				    id: "archived", 
				    itemdata: [
						{ text: "Be Prepared", url: "http://preparedness.families.com/blog/" },
						{ text: "Consumer", url: "http://consumer.families.com/blog/" },
						{ text: "Computing",  url: "http://counting.families.com/blog/" },
						{ text: "Home Business", url: "http://homebiz.families.com/blog/" },
						{ text: "Insurance", url: "http://insurance.families.com/blog/" },
						{ text: "Jobs", url: "http://jobs.families.com/blog/" },
						{ text: "Military",  url: "http://military.families.com/blog/" },
						{ text: "Real Estate",  url: "http://realestate.families.com/blog/" },
						{ text: "Money", url: "http://money.families.com/blog/" },
						{ text: "Politics", url: "http://politics.families.com/blog/"} 
				    ] 
				}
		    
		    }, 	
			{ text: "-------------------------------", url: "#" },	
			{ text: "Blog For Us!", url: "http://about.families.com/become-a-blogger" }
		]
	    },{
		id: "forums", 
		itemdata: [
		    { text: "Family", 
			submenu: { 
								id: "family", 
								itemdata: [
									{ text: "Family Time", url: "http://forums.families.com/family-time,f10" },
									{ text: "Family Challenges", url: "http://forums.families.com/family-and-life-challenges,f124" },
									{ text: "Family Faith (Religion)",  url: "http://forums.families.com/faith-amp-spirituality,f17" }
								] 
							}                            
		    }, 		
		    { text: "Health", url: "http://forums.families.com/health-and-wellbeing,f1146" },
		    { text: "Home", 
			submenu: { 
								id: "home", 
								itemdata: [
									{ text: "Homes", url: "http://forums.families.com/in-the-home,f110" },
									{ text: "Cooking", url: "http://forums.families.com/cooking-and-baking,f77" },
									{ text: "Frugal Living",  url: "http://forums.families.com/the-piggy-bank,f347" }
								] 
							}                            
		    }, 		
		     { text: "Fun Stuff", 
			submenu: { 
								id: "fun", 
								itemdata: [
									{ text: "Crafts & Hobbies", url: "http://forums.families.com/hobbies-amp-crafts,f73" },
									{ text: "Entertainment", url: "http://forums.families.com/hobbies-and-interests,f336" },
									{ text: "Family Travel",  url: "http://forums.families.com/family-travel,f54" },
									{ text: "Funny Stuff", url: "http://forums.families.com/funny-stuff,f742" },
									{ text: "Holidays & Celebrations", url: "http://forums.families.com/holidays-amp-celebrations,f795" }
								] 
							}                            
		    }, 		
		     { text: "Parenting", 
			submenu: { 
								id: "parenting", 
								itemdata: [
									{ text: "Adoption & Fostering", url: "http://forums.families.com/adoption-amp-fostering,f6" },
									{ text: "Ages & Stages", url: "http://forums.families.com/parenting-of-all-ages,f838" },
									{ text: "Babies & Toddlers",  url: "http://forums.families.com/newborns-to-2-years,f738" },
									{ text: "Mommy Chatter", url: "http://forums.families.com/mommy-chatter,f787" }
								] 
							}                            
		    }, 		
		     { text: "Pregnancy", 
			submenu: { 
								id: "pregnancy", 
								itemdata: [
									{ text: "Conception", url: "http://forums.families.com/conception-pregnancy-amp-birth,f710" },
									{ text: "Due in' Groups", url: "http://forums.families.com/pregnancy-due-in-groups,f854" }
								] 
							}                            
		    }, 		
		    { text: "Relationships", url: "http://forums.families.com/marriage-amp-relationships,f11" },
		    { text: "General Topics", url: "http://forums.families.com/general-discussions,f148" },
			{ text: "-------------------------------", url: "#" },
			{ text: "Who's Online", url: "http://www.families.com/now/" },
		    { text: "Latest Discussions", url: "http://forums.families.com/search.php?do=getdaily&searchin=families" },
		    { text: "New Members", url: "http://members.families.com/" },			
		    { text: "Join For Free!", url: "http://www.families.com/register/" },
			{ text: "-------------------------------", url: "#" },
			{ text: "Signature Tickers", url: "http://tickers.families.com/" },
		    { text: "Signature Counters", url: "http://counters.families.com/" },
			{ text: "-------------------------------", url: "#" },
			{ text: "Moderate For Us!", url: "http://about.families.com/be-a-forums-moderator" }
		]    
	    }
	];


	/*
	   Subscribe to the "beforerender" event, adding a submenu 
	   to each of the items in the MenuBar instance.
	*/
	oMenuBar.subscribe("beforeRender", function () {

		var nSubmenus = aSubmenuData.length,i;

	    if (this.getRoot() == this) {
			for (i = 0; i < nSubmenus; i++) {
				this.getItem(i).cfg.setProperty("submenu", aSubmenuData[i]);
			}
	    }

	});

	oMenuBar.render();         
    
    });