Create smartresize.js