This is called on window.smartresize, that's why i have the else.