$(document).ready(function()
{
  bindEvents();
  resizeColumns();
});

/**
 * Add event listenres.
 * @function
 */
function bindEvents()
{
  $(window).resize(resizeColumns);
}

/**
 * Stretch the columns to the window height if the window is bigger than the columns.
 * @function
 */
function resizeColumns()
{
  $('#columns').height('');
  
  if($('body').outerHeight() < $(window).height())
  {
    $('#columns').height($(window).height() - 315);
  }
  else
  {
    $('#columns').height('');
  }
}