var animateHeaderTitle = false;

$(document).ready(function(){
  // Set the side padding and height to match the viewport
  //setPadding();
  setHeight();
  
  if(animateHeaderTitle){
    // Drop in and rotate the logo
    $('#headerTitle').css({ top: '-300px', rotate: '0deg' });
    $('#headerTitle').animate({ top: '-44px', rotate: '360deg' }, { easing: 'easeOutElastic', duration: 3000 });
  }
  
  // Fade in the content area (doesn't work in IE thanks to the PNG opacity bug)
  if(!$.browser.msie){
    $('#pageBody').hide();
    $('#pageBody').fadeIn({ duration: 3000 });
  }
});

$(window).resize(function(){
  // Set the side padding and height to match the viewport
  //setPadding();
  setHeight();
});


function setPadding(){
  var padding = (($(window).width() - 1040) / 2) + 2;
  $('#left .top, #left .bottom, #right .top, #right .bottom').each(function(){
    $(this).width(padding);
  });
}

function setHeight(){
  var height = $(window).height();
  if (height > 500) {
    $('#pageContainer').height(height);
  }
}