$(document).ready(function() { backimage(); });
$(window).resize(function() { backimage(); });
	
function autotab(current,to) {
  if (current.getAttribute && current.value.length==current.getAttribute("maxlength")) {
	  to.focus() ;
  }
}

function backimage() {
  var x = $(window).height();
  var xx = $(window).height()*1.37;
  var y = $(window).width();
  if(xx > y){
  $('.body img').css('width','auto');
  $('.body img').css('height',x);
  $('.body').css('height',x);
  $('.body').css('width',y);
  } else {
  $('.body img').css('width',y);
  $('.body img').css('height','auto');
  $('.body').css('height',x);
  $('.body').css('width',y);
  }	
}
