
$(document).ready(function(){
  //Footer hide/show 
  $('#hFooter').click(function () {
    $('#hFooter').css({'display':'none'});
    $('#sFooter').css({'display':'block'});
    $('#hideFooter').animate({bottom:'4px'}, 'slow');
    $('#footer').animate({height:'4px'}, 'slow');
  });
  $('#sFooter').click(function () {
    $('#hFooter').css({'display':'block'});
    $('#sFooter').css({'display':'none'});
    $('#hideFooter').animate({bottom:'73px'}, 'slow');
    $('#footer').animate({height:'78px'}, 'slow');
  });


  //Takes all anchor tags that have rel="external" and forces them to a new window. This W3C validates
  //$("a[rel^='external']").click(function(){
  //   this.target = "_blank";
  //});

});

  //Used for onclick of a layer, instead of encapsulating layer with anchor tags. 
  //Show internal link with onclick
  function show_link(tag_link){
    window.location.href = tag_link;
  }

  //Show external link with onclick but in a new window.
  function show_link_nw(tag_link){
    window.open(tag_link);
  }

sfHover = function() {
  var sfEls = document.getElementById("menu").getElementsByTagName("LI");
  for (var i=0; i<sfEls.length; i++) {
    sfEls[i].onmouseover=function() {
      this.className+=" sfhover";
    }
    sfEls[i].onmouseout=function() {
      this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
    }
  }
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

