﻿/// <reference path="jquery-1.3.2.min-vsdoc.js"/>

$(document).ready(function()
{
  $("#archive img[src*=minus.jpg]").live("click", function()
  {
    var img = this;
    $("> ul:visible", this.parentNode).hide(500, function()
    {
      img.src = "../../content/plus.jpg";
      img.alt = "Collapse";
    });
  });

  $("#archive img[src*=plus.jpg]").live("click", function()
  {
    var img = this;
    $("> ul:hidden", this.parentNode).show(500, function()
    {
      img.src = "../../content/minus.jpg";
      img.alt = "Expand";
    });
  });

  $(".code.cs").each(function()
  {
    $(this).load("/code/format/cs.aspx", { code: $(this).html() });
  });

  $(".code.css").each(function()
  {
    $(this).load("/code/format/css.aspx", { code: $(this).html() });
  });

  $(".code.es").each(function()
  {
    $(this).load("/code/format/es.aspx", { code: $(this).html() });
  });

  $(".code.vb").each(function()
  {
    $(this).load("/code/format/vb.aspx", { code: $(this).html() });
  });

  $(".code.html").each(function()
  {
    $(this).load("/code/format/html.aspx", { code: $(this).html() });
  });

  $(".code.aspx").each(function()
  {
    $(this).load("/code/format/aspx.aspx", { code: $(this).html() });
  });

  $(".code.aspx-cs").each(function()
  {
    $(this).load("/code/format/aspx-cs.aspx", { code: $(this).html() });
  });

  $(".code.aspx-vb").each(function()
  {
    $(this).load("/code/format/aspx-vb.aspx", { code: $(this).html() });
  });
});