// set up drop downs anywhere in the body of the page. I think the bottom of the page is better.. 
// but you can experiment with effect on loadtime.
if (TransMenu.isSupported()) {

	//==================================================================================================
	// create a set of dropdowns
	//==================================================================================================
	// the first param should always be down, as it is here
	//
	// The second and third param are the top and left offset positions of the menus from their actuators
	// respectively. To make a menu appear a little to the left and bottom of an actuator, you could use
	// something like -5, 5
	//
	// The last parameter can be .topLeft, .bottomLeft, .topRight, or .bottomRight to inidicate the corner
	// of the actuator from which to measure the offset positions above. Here we are saying we want the 
	// menu to appear directly below the bottom left corner of the actuator
	//==================================================================================================
	var ms = new TransMenuSet(TransMenu.direction.down, 0, 0, TransMenu.reference.bottomLeft);

	//==================================================================================================
	// create a dropdown menu
	//==================================================================================================
	// the first parameter should be the HTML element which will act actuator for the menu
	//==================================================================================================
	

	var menu1 = ms.addMenu(document.getElementById("SportStacking"));
	menu1.addItem("What is it?", "sportStacking.html#What"); 
	menu1.addItem("How to Stack", "sportStacking.html#How "); 
	menu1.addItem("Anatomy of a Cup", "sportStacking.html#Anatomy");
	menu1.addItem("Sport Stacking lingo", "sportStacking.html#Lingo");

	var menu2 = ms.addMenu(document.getElementById("TeachersParents"));
	menu2.addItem("Teachers", "teachersParents.html#Teachers");
	
		var submenu21 = menu2.addMenu(menu2.items[0]);
		submenu21.addItem("Benefits", "teachersParents.html#Benefits");
		submenu21.addItem("Start a Program", "teachersParents.html#Start");
		submenu21.addItem("Schools", "teachersParents.html#Schools");
		
	menu2.addItem("Parents", "teachersParents.html#Parents");
	
	var menu3 = ms.addMenu(document.getElementById("Products"));
	menu3.addItem("Speed Stacks", "products.html#SpeedStacks");
	menu3.addItem("Mini Speed Stacks", "products.html#MiniSpeedStacks");
	menu3.addItem("Super Stacks and Super Minis", "products.html#SuperStacksSuperMinis");
	menu3.addItem("Stack Pack", "products.html#StackPack");	
	menu3.addItem("StackMats and Timers", "products.html#StackMatsTimers");
	menu3.addItem("Battlestack", "products.html#Battlestack");
	menu3.addItem("Speed Stacks for Schools", "products.html#SpeedStacksSchools");
	
		var submenu31 = menu3.addMenu(menu3.items[6]);
		submenu31.addItem("Sport Packs", "products.html#SportPacks");
		submenu31.addItem("Jumbo Stacks", "products.html#JumboStacks");
		submenu31.addItem("Stack Spots", "products.html#StackSpots");
		submenu31.addItem("DVDs and Guides", "products.html#DVDGuides");

	//var menu4 = ms.addMenu(document.getElementById("News"));
	//menu4.addItem("Features", "news.html#Features");
	//menu4.addItem("Media", "news.html#Media");
	//menu4.addItem("Photo Gallery", "news.html#Photo");
	//menu4.addItem("Video", "news.html#Video");
	
	//==================================================================================================

	//==================================================================================================
	// write drop downs into page
	//==================================================================================================
	// this method writes all the HTML for the menus into the page with document.write(). It must be
	// called within the body of the HTML page.
	//==================================================================================================
	TransMenu.renderAll();
}
