AMD compliant

Making the plugin AMD complaint as when used in require JS gives error
jQuery not defined even though the dependency is defined in shims