moving js into theme js file