moved code to CMS class and added jquery