Refactored jquery plugin to look at onload and resize events.