
$(document).ready(function() {
if (navigator.appVersion.indexOf("Safari")>-1) {
}else{
create_spacebox();
}
for(var i=500;i<=10000;i++) {
setTimeout("create_spacebox()",i);
i=i+500;
}

});

var animation_ongoing=false;
var engelcounter1=0;
function engel_counter() {
if(engelcounter1<3) {
animation_ongoing=true;
engelcounter1++;
$('#harfeoverlay').fadeIn(125,function(){
$('#harfeoverlay').delay(500).fadeOut(500,function(){
animation_ongoing=false;
$('#counterdiv'+engelcounter1).fadeIn(250);
if(engelcounter1==3) {
$('#quiz_gewonnen').delay(500).fadeIn(500);
}});
});

}
}

function create_spacebox() {
var main_new_1=document.getElementById('main_new_1');
var main_new_2=document.getElementById('main_new_2');
if (main_new_1 && main_new_2) {
h1=main_new_1.offsetHeight;
h2=main_new_2.offsetHeight;
var difference=Math.abs(h1-h2);
difference=difference-10;
if(difference>=10) {
if(h1>h2) {
var nel=main_new_2;
}else{
var nel=main_new_1;
}
ddiv=document.getElementById('spacebox');
if (ddiv.parentNode.nodeName.toLowerCase()!='td') {
nel.parentNode.appendChild(ddiv);
ddiv.style.width=nel.offsetWidth+'px';
ddiv.style.display='block';
}

document.getElementById('spacebox').style.height=difference+'px';
document.getElementById('spacer_ul').style.top=(difference-5)+'px';
document.getElementById('spacer_ur').style.top=(difference-5)+'px';

}
}
}


