/**
 * @requires jquery.js, jquery.dimmensions.js
 */
$(document).ready(function() {
  
  /**
   * Main window centering relative to viewport size
   */
  $(window).bind('resize', function() {
    $('#wrapper').css('display', 'block');
    var viewport_width = $(window).width();
    var viewport_height = $(window).height();
    var mw_width = $('#main_window').width();
    var mw_height = $('#main_window').height();
    var mw_offset_x = (viewport_width - mw_width) / 2 + 'px';
    var ct_offset_x = (mw_width - viewport_width) / 2 + 'px';
    $('#main_window').css('left', mw_offset_x);
    // $('#atom, #bottom').css('left', ct_offset_x);
    // $('a img').show();
  });
  $(window).trigger('resize');  
    
//  var timeout = setTimeout(function() {
//    $("a img").lazyload({
//      placeholder : "application/data/layouts/pierron/gfx/5.jpg", 
//      failurelimit : 10
//    });
//  }, 50);
  
});