Converted plugin to work with jQuery 1.11