var pageShow = new function()
{
  this.showPage = function(div, span, addedFunction)
  {
    $(".loading-page").show();
    $('.div-container').hide();

    if (addedFunction != null)
    {
      addedFunction();
    }

    $("#currentPage").toggleClass("page-hidden");
    $("#currentPage-close").toggleClass("page-hidden-close");
    var currDiv = $(span).parent();
    $(currDiv).removeClass("page-hidden");
    $(currDiv).addClass("page-select");
    var closeDiv = $(currDiv).next();
    $(closeDiv).removeClass("page-hidden-close");
    $(closeDiv).addClass("page-select-close");

    $("#currentPage").removeAttr("id");
    $("#currentPage-close").removeAttr("id");
    $(currDiv).attr("id", "currentPage");
    $(closeDiv).attr("id", "currentPage-close");
    Cufon.refresh();

    $('#div-' + div).show();
    $(".loading-page").hide();
  }

  this.showHiddenDiv = function(div, hiddenChild)
  {
    var contentDiv = $(div).next();
    if (hiddenChild)
    {
      var contentDivChild = $(contentDiv).children()[0];
      $(contentDivChild).show();
    }
    $(contentDiv).toggle('blind');

    var readDiv = $(div).children()[0];
    var hideDiv = $(div).children()[1];
    $(readDiv).toggle();
    $(hideDiv).toggle();
  }
}
