rewrite sample

1. use define for named module
2. use seajs for loading module
3. rewrite test
note: run test well in browser but phantomjs