$(document).ready(function() {

  $(".menu a").mouseover(function(){
    var border=$(".border-line span");
    if(border.is(":hidden")){
     border.css("margin-left",$(this).css("left"));
     border.show("medium");
    } else {
     $(".border-line span").animate({marginLeft: $(this).css("left")})
    };
  });

  $(".field input, .textarea textarea").focus(function () {
    $(".field input, .textarea textarea").parent().removeClass('focus');
    $(this).parent().addClass('focus');
  });
  window.setTimeout('slideAndShowPage()',1000);

  checkResolution();
});

function slideAndShowPage() {
  $('#content').slideDown("slow").animate({opacity: 1});
}

function checkResolution() {
  if((screen.width>=1680)&&(screen.height>=1050)) {
    $("body").addClass("res1680");
  } else if((screen.width>=1280)&&(screen.height>=1024)) {
    $("body").addClass("res1280");
  } else if((screen.width>=1024)&&(screen.height>=768)) {
    $("body").addClass("res1024");
  } else {
    $("body").addClass("resTiny");
  }
}
