function activateTabs(container) {
  var tabID = new Querystring().params["tab"];
  if (tabID != undefined) {
    var tab = "#tab_"+tabID;
    var tabContent = "#tab_"+tabID+"-content";
    container.find(tab).addClass("selected");
    $(tabContent).addClass("active");
  } else {
    container.find(".tab:first").addClass("selected");
    container.find(".tab:first a").animate( { backgroundColor:"#c6e0eb"}, 100 )
    $(".tab-content:first").addClass("active");
  }
  container.find(".tab").click(function() {
	  var tab = this
	  $(".tab").removeClass("selected");
    $(".tab a").animate( { backgroundColor:"#d7dadd"}, 50 );
	  $(tab).addClass("selected");
	  $(tab).find("a").animate( { backgroundColor:"#c6e0eb"}, 100 );
	  
	  //$(".tab-content").removeClass("active");
	  $(".tab-content").hide();
	  
	  var id = $(tab).attr("id");
	  //$("#"+id+"-content").addClass("active");
	  $("#"+id+"-content").fadeIn("slow");
	  
	  
	  return false;
	});
  
  container.find(".tab a").hover(
    function() {
      $(this).animate( { backgroundColor:"#c6e0eb"}, 100 )
    },
    function() {
      if (!$(this).parent().hasClass("selected"))
        $(this).animate( { backgroundColor:"#d7dadd"}, 200 )
    }
  );
}