Split up code into jQuery plugin and demo