A Factory function for creating jQuery plugins.