Changed plugin setup to use RequireJS if present

Uses RequireJS to resolve dependencies and if this fails rolls back to the $("head").append() method.
Changed plugin setup to use RequireJS if present
Comply to code style
Merge pull request #183 from u-quark/master

Support for RequireJS