// AFA RIGHT NAV

var myMenu;
	window.onload = function() {
		myMenu = new SDMenu("my_menu");
    myMenu.speed = 5;                     // Menu sliding speed (1 - 5 recomended)
    myMenu.remember = false;               // Store menu states (expanded or collapsed) in cookie and restore later
    myMenu.oneSmOnly = true;             // One expanded submenu at a time
    myMenu.markCurrent = true;            // Mark current link / page (link.href == location.href)
		myMenu.init();
	};

  
var tableopen = "<table width=180 border=0 cellspacing=0 cellpadding=0><tr><td class=expanded>";
var tableclose = "</td></tr></table>";

  
// WHERE AM I? Look for model codes in URL to determine which section you're in.

// Apparel
  cat=1;

// Footwear
if (location.href.indexOf("/ftw/") != -1) {
  cat=2;
  
// Gear
} else if (location.href.indexOf("/gear/") != -1) {
  cat=3;
}

// Index
/*} else if (location.href.indexOf("index.html") != -1) {
  cat=0;
}
*/

if (location.href.indexOf("/gear/") != -1) {
document.write("<img src=\"http://www.cannondale.com/js/09/sdmenu/topGear.gif\" height=24 width=180>");
} else {
document.write("<img src=\"http://www.cannondale.com/js/09/sdmenu/topWear.gif\" height=24 width=180>");
}

document.write("<div style=\"float: left\" id=\"my_menu\" class=\"sdmenu\">");




  /************************** APPAREL **************************/     

  if (cat == 1){
  document.write("<div>");
  } else {
  document.write("<div class=collapsed>");
  }
      
      document.write("<span>APPAREL</span>");
        
        // Browse By Collection
        document.write("<a href=\"/a_a/clothing/09/SS/index.html\"><strong>Browse by Collections</strong></a>");

            if (location.href.indexOf("SS/collection") != -1 || location.href.indexOf("feb2/collection") != -1 || location.href.indexOf("#collection") != -1 || location.href.indexOf("index") != -1) {
            
            document.write(tableopen);
            
	          document.write("<a href=\"/a_a/clothing/09/SS/collection_respun.html\">&nbsp;&nbsp;&nbsp;- Re-Spun</a>");
	          document.write("<a href=\"/a_a/clothing/09/SS/collection_le.html\">&nbsp;&nbsp;&nbsp;- L.E.</a>");
            document.write("<a href=\"/a_a/clothing/09/SS/collection_high_performance.html\">&nbsp;&nbsp;&nbsp;- High 	Performance</a>");
     	      document.write("<a href=\"/a_a/clothing/09/SS/collection_shelter.html\">&nbsp;&nbsp;&nbsp;- Shelter</a>");
	document.write("<a href=\"/a_a/clothing/09/SS/collection_grind.html\">&nbsp;&nbsp;&nbsp;- Grind</a>");
            document.write("<a href=\"/a_a/clothing/09/SS/collection_apres.html\">&nbsp;&nbsp;&nbsp;- Apres Ride</a>");
		document.write("<a href=\"/a_a/clothing/09/SS/collection_accessories.html\">&nbsp;&nbsp;&nbsp;- Accessories</a>");

            
            document.write("<a href=\"/a_a/clothing/08/FW/mens.html\" target=\"_blank\">View Fall/Winter Collections</a>");

            document.write(tableclose);
            
            }


    
        // Team
        //document.write("<a href=\"/a_a/clothing/09/SS/team.html\"><strong>Team Apparel</strong></a>");

            /*if (location.href.indexOf("SS/team") != -1 || location.href.indexOf("feb2/team") != -1 || location.href.indexOf("#team") != -1) {
  
            document.write(tableopen);
            
            document.write("<a href=\"http://www.cannondale.com/a_a/clothing/09/SS/team_liquigas.html\">Liquigas</a>");
            document.write("<a href=\"http://www.cannondale.com/a_a/clothing/09/SS/team_vredestein.html\">Vredestein</a>");
            document.write("<a href=\"http://www.cannondale.com/a_a/clothing/09/SS/team_healthnet.html\">Health Net</a>");
            //document.write("<a href=\"http://www.cannondale.com/a_a/clothing/09/SS/team_bearnaked.html\">Bear Naked</a>");
            document.write("<a href=\"http://www.cannondale.com/a_a/clothing/09/SS/team_sobe.html\">Sobe/Cannondale</a>");
            
            document.write("<a href=\"http://www.cannondale.com/a_a/clothing/08/FW/team.html\" target=\"_blank\">Fall/Winter Collection</a>");

            document.write(tableclose);
            
            }*/
            
        
        // Kids
        document.write("<a href=\"/a_a/clothing/09/SS/kids.html\"><strong>Kid's Apparel</strong></a>");
        
        
        //document.write("<a href=\"\"><br><br></a>");
        
        // Tech Guides
        document.write("<a href=\"/download/app_pdf/2009_ss_apparel_catalog_web.pdf\" target=\"_blank\">Catalog (PDF)</a>");
        document.write("<a href=\"/a_a/clothing/09/SS09_TechGuides.pdf\" target=\"_blank\">Fabric Technology (PDF)</a>");
        document.write("<a href=\"/a_a/clothing/09/SS/guide_fabric.html\">Fabric Guide</a>");
        document.write("<a href=\"/a_a/clothing/09/SS/guide_chamois.html\">Chamois Guide</a>");
        document.write("<a href=\"/a_a/clothing/09/SS/guide_size.html\">Size &amp; Fit Guide</a>");

        
        document.write("</div>");
        
       
       
        
        
  /************************** FOOTWEAR **************************/     
        
  if (cat == 2){
  document.write("<div>");
  } else {
  document.write("<div class=collapsed>");
  }
      
      document.write("<span>FOOTWEAR</span>");
      
            document.write(tableopen);

        
        document.write("<a href=\"/ftw/footwear.html\"><strong>Footwear Collection</strong></a>");

        
        
            document.write(tableclose);        
        
        //document.write("<a href=\"\"></a>");
        
        // Tech Guides
        document.write("<a href=\"/ftw/guide_size.html\">Technology & Footwear Size Guide</a>");
        

 
      document.write("</div>");
        
        
        
        
        
        
/************************** GEAR **************************/     
        
  if (cat == 3){
  document.write("<div>");
  } else {
  document.write("<div class=collapsed>");
  }
      
      document.write("<span>GEAR</span>");
        
            //document.write(tableopen);
        
        document.write("<a href=\"/a_a/gear/09/SS/bags.html\"><strong>Bags</strong></a>");
        document.write("<a href=\"/a_a/gear/09/SS/bottles.html\"><strong>Bottles &amp; Cages</strong></a>");
        document.write("<a href=\"/a_a/gear/09/SS/components.html\"><strong>Components</strong></a>");
        document.write("<a href=\"/a_a/gear/09/SS/computers.html\"><strong>Computers</strong></a>");
        document.write("<a href=\"/a_a/gear/09/SS/lights.html\"><strong>Lights</strong></a>");
        document.write("<a href=\"/a_a/gear/09/SS/locks.html\"><strong>Locks</strong></a>");
        document.write("<a href=\"/a_a/gear/09/SS/pumps.html\"><strong>Pumps</strong></a>");
        document.write("<a href=\"/a_a/gear/09/SS/tools.html\"><strong>Tools</strong></a>");

            //document.write(tableclose);       
                 
        document.write("</div>");
        
    document.write("</div>");
  


      

