Implement as jquery-plugin. Add sample page