jQuery.noConflict();
var jQueryWithTreeview = jQuery; //!! REMOVE this
jQuery( function() {
  jQuery("#sungardNav").prepend(jQuery('<a href="/CommonsSunGardHE/">SunGard Higher Education Commons</a><br/>'));
  jQuery("#sungardNavFeatured").html('<a href="/CommonsBanner/">Banner</a><br>\n<a href="/CommonsLuminis/">Luminis Platform</a><br>\n<a href="/CommonsPC/">PowerCAMPUS</a><br>\n');
  var navTreeUrl="/GetCommunityTree.aspx?start=CommonsSunGardHE";
  jQuery.get(navTreeUrl, function(data) {
      jQueryWithTreeview("#navSeeAll").css('display','none');//hide old font entry
      jQueryWithTreeview("#navData").html(data).before(jQuery('<font size="-2"><a href="#" id="navSeeAll" onclick="jQueryWithTreeview(\'#navData\').toggle();return false;">See all communities...</a></font>'));
      jQueryWithTreeview("div#navData > ul:first-child > li > ul > li").addClass("closed");
      jQueryWithTreeview("div#navData > ul:first-child").treeview( {
              // collapsed: true,
              // animated: "fast",
              // unique: true,
              persist: "location"
                  });
  });
  jQuery(function() {// make My Favorites overlay everything (IE requires parent has higher z-index)
             jQuery("#nav-user-groups ul ul").css("z-index","999");
	     jQuery("#nav").css("position","relative").css("z-index","1000");
	     // chrome needs
	     jQuery("#nav-user-groups ul ul").css("margin-top","-2px").css("border-top","2px solid white");
      });
  function fixSignup() {
    jQuery('li.register > a').attr('href','/submitform/SunGardHECommonsInvitation/');
  }
  fixSignup();
});
