Examples page - tidied up Javascript to leverage jQuery