define plugin before domReady

Currently the plugin definition is wrapped in `$(function(){})` - which means that it won't be registered until the dom is ready, rather than when the file is executed.

This tripped me up a bit while I was using this plugin