wrap plugin code in self-executing function. add duration and animation defaults. add comments for clarity.