// JavaScript Document

$(document).ready(function() {
// Popup help
$("a.moreInfoLink").each(function(){
 if(this.id) {
  $(this).click( function(){
    if($("#more" + this.id).css("display")=="none") {
      $("div.activeInfoBox").hide();
      $("div.activeInfoBox").removeClass("activeInfoBox");
      $("#more" + this.id).show();
      $("#more" + this.id).addClass("activeInfoBox");
    } else {
      $("#more" + this.id).hide();
      $("#more" + this.id).removeClass("activeInfoBox");
    } // if
  }); // click
  $("#more" + this.id + " a:last").click(function(){
    $(this).parent().parent('div').hide();
    $(this).parent().parent('div').removeClass("activeInfoBox");
   });
  $("#more" + this.id ).click(function() {
    $(this).hide();
    $(this).removeClass("activeInfoBox");
  });
}
});
// Features selector
$("#mainFeaturesList li a").each(function() {
  if(this.id) {
   $(this).click( function(){
// set active tab
     $("#mainFeaturesList li a.active").removeClass("active");
     $(this).addClass("active");
// show correcponding content
     $("div.activeContent").hide();
     $("div.activeContent").removeClass("activeContent");
     if($("#" + this.id + "Content").css("display")=="none") {
      $("#" + this.id + "Content").show();
      $("#" + this.id + "Content").addClass("activeContent");
     };
   });
  }
});	// end #mainFeaturesList li a
});