$(document).ready(function(){
  
  $("#navigation div").hover(function(){
    $(this).css("background", "#f0d890");
  }, function(){
    $(this).css("background", "transparent");
  });
  
  $("#navigation div").click(function(){
    var t_link = $(this).attr("link");
    document.location = t_link;
  });
  
  
  $(".frontBox").hover(function(){
    $(this).css("background", "#F7F0BA");
  },function(){
    $(this).css("background", "transparent");
  });
  $(".frontBox").click(function(){
    var t_link = $(this).attr("link");
    if(t_link!=""){
      document.location = t_link;
    }
  });
  
  resize_content();
});
$(window).resize(function(){
  resize_content();
});

function resize_content(){
  var d_height = $(document).height();
  var w_height = $(window).height();
  if(d_height == w_height){
    $("#mainContent").height(d_height-220);
  }
}