$(function() {
  $(".loginTitle, #loginClose").click(function(){
    if ($("#loginForm").is(":hidden")) {
      $("#loginForm").slideDown();
      $("#color").slideUp();
    } else {
      $("#loginForm").slideUp();
      $("#color").slideDown();
    }
  });

  showLoginForm = function(){
    $("#loginForm").show();
    $("#color").hide();
  };
  
  hideLoginForm = function(){
    $("#loginForm").hide();
    $("#color").show();
  };
  
  /*Turn login form labels in to input values*/
  var origUserName = $("#uname").text();
  var origPassWord = $("#pword").text();
  $("#user").attr("value", origUserName);
  $("#pass").attr("value", origPassWord);

  /*Hide the labels now*/
  $("#uname").hide();
  $("#pword").hide();
  
  /*Clear out the fields for the user*/
  /*
  var username = "";
  var password = "";

  $("#user").focus(function () {
    var username = $(this).val();
    $("#user").attr("value","")
  }).blur(function () {
    $("#user").attr("value","username")
  });


  $("#pass").focus(function () {
    $("#pass").attr("value","")
  }).blur(function () {
    $("#pass").attr("value","username")
  });
  */      

  /*Menu js*/
  $('.active').css({'opacity' : .8});
  $('.navi').mouseenter(function(){
    //$(this).siblings().children('h2').stop();
    $(this).children('h2:not(.active)').animate({'opacity' : .8}, 200);
  });
  $('.navi').mouseleave(function(){
    $(this).children('h2:not(.active)').animate({'opacity' : .4}, 100)
  });
});