  $(document).ready(function() {
    /* hide all */
    $("div.colum div.boxTitle").hide();
    
    $("div.colum div.boxHeader").click(function() {
      var box = $(this);
      if ($(this).next("div.boxTitle").css("display") == "none") {
        $("div.colum div.boxTitle").slideUp("fast");
        box.next("div.boxTitle").slideDown("slow");
        $("div.colum div.boxHeader").removeClass("boxHeader_selected");
        box.addClass("boxHeader_selected");
      } else {
        $(this).next("div.boxTitle").slideUp("fast", function() {
          box.removeClass("boxHeader_selected");
        });
      }
    });

    $("div.colum div.boxHeader").mouseover(function() {
      $(this).addClass("boxHeader_over");
    });
    $("div.colum div.boxHeader").mouseout(function() {
      $(this).removeClass("boxHeader_over");
    });
    
    /* open only relevant menu */
    if (window.location.href.indexOf("type=3") >= 0) {
      /* annual reports */
      $("div.colum div.boxHeader").eq(1).click();
    } else if (window.location.href.indexOf("type=2") >= 0) {
      /* semi-annual */
      $("div.colum div.boxHeader").eq(2).click();
    } else if (window.location.href.indexOf("type=1") >= 0) {
      /* MRFP */
      $("div.colum div.boxHeader").eq(3).click();
    } else if (window.location.href.indexOf("type=5") >= 0) {
      /* IMRFP */
      $("div.colum div.boxHeader").eq(4).click();
    } else if (window.location.href.indexOf("type=6") >= 0) {
      /* quarterly */
      $("div.colum div.boxHeader").eq(5).click();
    }
    
    /* phone number for AIC reports */
    $.urlParam = function(name){
      var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href);
      if (!results) { return 0; }
      return results[1] || 0;}
      
    $("#lblPrint").html($("#lblPrint").html().replace("Manulife Mutual Funds", " "));
    $("#lblPrint").html($("#lblPrint").html().replace("de Fonds communs Manuvie", " "));

    if (parseInt($.urlParam("cat")) >= 6) {
      $("#lblPrint").html($("#lblPrint").html().replace("1-888-588-7999", "1-800-263-2144"));
      $("#lblPrint").html($("#lblPrint").html().replace("1-877-426-9991", "1-800-263-2144"));      
    }
  });