You can change
Code:
$(document).ready(function() {
with
Code:
window.addEventListener('load', function () {
and you dont need JQuery
Example:
Code:
window.addEventListener('load', function () {
window.frames["f1"].addEventListener("resize", setup);
});