refactoring jquery.imagecover.js