mobify/pikabu — pull request #19 by scalvert (2014-03-09 00:13:24+00:00)
Title: First pass at refactoring pikabu. 

Refactoring pikabu

Status: **Opened for visibility**

Reviewers: @tedtate @kpeatt @donnielrt @ericmuyser @Helen-Mobify

## Changes
- Adding jshint grunt task
- Fixing (almost) all jshint errors (left a few arguably acceptable ones)
- Reorganized the code so that it follows a more predictable pattern.
- Added plugin definition
- Bound instance to element's data when initialized
- Normalized event names, and added a better mechanism for event triggering
- Added the following events:
-- initialized
-- beforeOpen
-- afterOpen
-- beforeClose
-- afterClose
- Added in binding event handler context to the instance of pikabu
- Added in passing sidebar element when triggering event

## How to test-drive this PR
npm install
grunt test