function Preloader() {}
Preloader.init = function() {
   var $preloader = $('#preloader'),
       $prescreen = $('#screen'),
       docHeight = $(document).height(),
       docWidth = $(document).width(),
       screenCenterX = $(document).innerWidth() / 2,
       screenCenterY = $(document).innerHeight() / 2;

   window.scroll(0, 10770);

   $prescreen.css({
      'position': 'absolute',
      'z-index': 9999,
      'width': docWidth + 'px',
      'height': docHeight + 'px',
      'background-color': '#c7eafb'
   });

   $preloader.css({
      'position': 'absolute',
      'z-index': 99999,
      'left': screenCenterX - 50 + 'px',
      'top': docHeight - 500 + 'px'
   });

}

Preloader.startSite = function() {
   $("#preloader, #screen")
      .delay(3000)
      .fadeOut('slow');
   $(window).scroll(function() {
      $("#preloader, #screen")
         .remove();
   });
}

Preloader.init();

$(function() {
   Preloader.init();
   document.ready = function() {
      Preloader.startSite();
   }
});

