
  /*
  * Init
  * Simple init for little fixes
  */
  
  var init = {
          loaded: false,
          run: function(){
                  // Check height
                  setTimeout(function(){
                          if( $( '#body' ).height() < $( document ).height() ) 
                                  $( '#body' ).css( 'height', $( document ).height() );
                  }, 50 );
    
                  // Check content height
                  var content = $( 'div.content' );
                  if( content.height() < 430 )
                          content.css( 'height', '430px' );
                          
                  if( !this.loaded && false ) {
                          this.loaded = true;
                          
                          // Check if we're on the frontpage
                          setTimeout(function(){
                                  init.imgBlock = $( '.content > div.splash > img' );
                                  $( '.content object' ).remove();
                          
                                  if( init.imgBlock.length ) {
             
                                          init.imgBlock.css({
                                                position: 'absolute',
                                                right: '-200px',
                                                top: '-10px',
                                                zIndex: '500'
                                          }).data({ right: 200, top: 10 }).show();
                                          
                                          // Hide flash.. no.. delete it!
                                          init.imgBlock.parent().css( 'height', init.imgBlock.height() ).css( 'overflow', 'hidden' );
                                          //init.imgBlock.parent().prev().remove();
                                          
                                          init.fadeIn();
                                  }
                          }, 3000 );
                  }
          },
          fadeIn: function() {
                  // Update imgBlock
                  //init.imgBlock.fadeIn(2000);
                  init.fadeStep();
                  
                  // Next update
                  init.interval = setInterval( function(){
                          init.fadeStep();
                  }, 35 )
          },
          fadeStep: function() {
                  // Update data
                  init.imgBlock.data({
                          right: ( init.imgBlock.data( 'right' ) - 10 )
                  });
                  
                  // Update CSS
                  init.imgBlock.css({
                          'right': '-' + init.imgBlock.data( 'right' ) + 'px'
                  });
                  
                  // Timeout?
                  if( init.imgBlock.data( 'right' ) > 0 ) {
                  }
                  else {
                          clearInterval( init.interval );
                          // Update image
                          // init.imgBlock.attr( 'src', init.imgBlock.attr( 'src' ).replace( /splash.png/g, 'pack.png' ) );
                  }
          }
  };
  
  $(function(){
         init.run();
  });
  
  // resize
  $( window ).bind( 'resize', function(){
          init.run();
  });
