(function() {
  var show;
  $(function() {
    $('#nav a').click(function(e) {
      var showWhat;
      e.preventDefault();
      showWhat = "#" + $(this).data('show');
      show($(this), $("" + showWhat + "-container"));
      return window.location.hash = showWhat;
    });
    if (window.location.hash !== "") {
      return $("" + window.location.hash + "-nav").click();
    } else {
      return $('#nav a:first-child').click();
    }
  });
  show = function($link, $showWhat) {
    $('.container').not($showWhat).hide();
    $showWhat.show();
    $('#nav a').not($link).removeClass('active');
    $link.addClass('active');
    $('.container').not($showWhat).hide();
    return $showWhat.show();
  };
}).call(this);

