factory used to create/extend jQuery plugins