dispatch({
  "": function(){
    (function(mainmenu, path){
      var conv = function(index){
        var img = $(mainmenu[index]);
        img.attr("src", img.attr("src").replace(".png", "_h.png")).removeClass("hover");
      };
      var b = false;
      mainmenu.each(function(i){
        if(path === $(this).parent().attr("href")){conv(i); b = true;}
      });
      if(b) return;
      if(path.indexOf("/studioguide") !== -1){
        conv(1);
      }else if(path.indexOf("/lecturer") !== -1){
        conv(2);
      }else if(path.indexOf("/schedule") !== -1){
        conv(3);
      }else if(path.indexOf("/report") !== -1){
        conv(4);
      }else if(path.indexOf("/apply") !== -1){
        conv(5);
      }else if(path.indexOf("/access") !== -1){
        conv(6);
      }
    })($("ul#mainmenu li a img"), location.href);

    $(".hover").each(function(){
      var img = $(this);
      var src = $(this).attr("src");
      img.hover(function(){
        img.attr("src", src.replace(".png", "_h.png"));
      }, function(){
        img.attr("src", src);
      });
    });

    if($("#main-flash").length === 1){
      var so = new SWFObject("static/main.swf", "flash", 671, 335, 6, "#FFFFFF");
      so.addParam("wmode", "transparent");
      so.write("main-flash");
    }

    if(typeof DD_belatedPNG !== "undefined"){
      DD_belatedPNG.fix("h2 img, .pngfix");
    }
  }
});

