Move iframe resize function into the JS file