function pseudoClick(e) {
  e = maggot.event(e);
  if(e.keyCode != 13) return;
  if(e.target && e.target.onclick) {
    e.target.onclick();
  }
}
try {document.execCommad("BackgroundImageCache", false, true);}catch(e){}
$(function(){
  var $topmenus = $('#topMenu > li');
  $topmenus.each(function(index){
    var $this = $(this);
    $this.hover(
      function(e){
        $('ul:eq(0)',this).css('top','35px').fadeIn('fast').animate({top:'30px'},'fast');
      },
      function(e){
        $('ul:eq(0)',this).css('top','30px').hide();
      }
    );
    var offset = $this.offset(), $ul = $('ul:eq(0)', this).css('left','-950px');
    var left = offset.left, width = $ul.outerWidth();
    if(left < 300) left = 300;
    if(left + width > 950) left = 950 - width;
    $ul.css({display:'none',left:left + 'px',width:width+'px'});
  });
  var $info = $('#info');
  $('a',$info).each(function(index){
    $(this).mouseover(function(){
      $info.css('background-image','url(/resource/images/ipsi/bg_info_img' + (index + 1) + '.gif)');
    });
  });
  var boardIndex = document.getElementById("boardIndex");
  $('a.boardTab',boardIndex).mouseover(function(e){
    boardIndex.className = $.attr(e.target,'href').split("#")[1];
  });
});