//<script language="javascript">
//DO NOT MOVE THIS INTO document.ready
//The slider requires the images to be fully loaded
//in order to work properly.
$(window).load(function() {
  var fixIEFonts = function() {
    if($.browser.msie) {
      $("#slider *").css({filter: ""});

      if($("#slider").data("nivo:vars") && 0 == $("#slider").data("nivo:vars").currentSlide) {
        $(".nivo-caption .description").css({color: "#004774"});
      }
    }
  }

  $("#slider").nivoSlider({
    effect: "fade",
    pauseTime: 13000,
    directionNav: true,
    directionNavHide: false,
    keyboardNav: false,
    pauseOnHover: true,
    slices: 1,
    captionOpacity: 1.0,
    startSlide: $(".initial-image").attr("id").substring(13) - 1,
    afterChange: fixIEFonts,
    afterLoad: function() {
      window.setTimeout(function() {
        fixIEFonts();
      }, 500);
    }
  });
});

$(document).ready(function() {

  $("#topics-container img").css({opacity: 0.7});
  $("#topics-container div").hover(function(event) {
    $("img", $(this))
      .stop()
      .animate({opacity: 1}, "fast");
  }, function(event) {
    $("img", $(this))
      .stop()
      .animate({opacity: 0.7}, "fast");
  });

  $("#topics-container div")
    .css({cursor: "pointer"})
    .click(function(event) {
      document.location.href = $("a", $(this)).attr("href");
    });

});
