Javascript and Html5 reusable plugins