window.addEvent('resize', function() {
  resize = true;
});

function start() {
  SqueezeBox.initialize();
  build();
  calcSets();
  var s = set[0];
  for ( var i=anz-1; i>=0; i-- ) {
    var w = waben[i];
    w.schrift.setStyles({
      'left': s[i].x,
      'top': s[i].y
    });
    w.coords = s[i];
    w.setStyles({
      'height': height,
      'width': width
    });
    w.text.setStyles( {
      'margin-top': -height*0.60,
      'font-size': height/8
    });      
  }
  
  new Fx.Group({
    duration: 5000,
    selector: 'body div.schrift',
    calc: function( now ) { 
      return 'opacity: '+now; 
    },
    onComplete: function() {
      timer = shuffle.delay( 2000 );
      var page = window.location.search.substr( 1 ).capitalize();
      var index = id.indexOf( page );
      if ( index>=0 )
        waben[index].select();
    }
  }).start( 0, 1 );
}


