Move window scroll and resize binding inside jquery function

 - Tested and working well
 - For issue #5