Replaced annonymous function by a function to be able to call it on wind...

...ow resize