function resize() { // still voodoo - but isolated voodoo
  var window_height = $(window).height();
  var header_offset = $('div#header').height()
  var footer_offset = $('div#footer').height()
  var tab_offset = $('ul.tab-strip').height();

  var main_height = window_height - header_offset - footer_offset -   $('div#warning-bar').height();

  var off = $('body.prelogin') ? 0 : 13; // if we're using the logged in templates, we need some magic
  
  $('div#library_list').height(main_height - off);
  $('div#wrapper').height(main_height - off);
  $('div#col_a').height(main_height - off);
  $('div#col_b').height(main_height - 49 - tab_offset);
  $('div#library').height(main_height - off);
  $('div#secondary').height(main_height - 2 - tab_offset);
  $('div#video_list').height(main_height - tab_offset);
  $('div.video_playback').height(main_height - 2 - tab_offset);
  $('div.concave_box').height(main_height - 49 - tab_offset);
  
  
  $('.xy-center').each(function() {
    $(this).css(
      { paddingTop: ($(this).parent('div').height() / 2.8) - 12 + 'px' }
    );
  });
  
  var w = $("#video_list").width();
  if (window.location.pathname != '/playlists/suggested') 
    $("#playlist-header-bar").css({ width: w - 80, right: 40 });
    
  $('#outer-player').css({ marginTop: ($(".video_playback").height() - 510) / 2 });
}

$(document).ready(function(){
  resize();
  $(window).resize(resize);
  // window.onresize = resize;
  window.onscroll = resize;
});
