Revert "Revert "Replacing smart resize to jQuery resize""

This reverts commit f92f27787522b8ae2b84ec2dfd1362fca3b4ea45.