﻿function init() {
    setTimeout(onDelayComplete, 500);
}

function onDelayComplete() {
    var h1 = $('#template_content').height();
    var h2 = $('#template_content').css('margin-top') + "";
    h2 = h2.replace("px", "") * 1;
    
    if((h1 + h2) < 626) {
        $('#bg_filler').css('height', 626);
    }
    else { 
        $('#bg_filler').css('height', h1 + h2);
    }
}

function chronicles_init() {
    setTimeout(onDelayComplete2, 500);
}

function onDelayComplete2() {
    var h1 = $('#template_content').height();
    var h2 = $('#template_content').css('margin-top') + "";
    h2 = h2.replace("px", "") * 1;
    
    if((h1 + h2) < 691) {
        $('#bg_filler').css('height', 691);
    }
    else { 
        $('#bg_filler').css('height', h1 + h2);
    }
}