adjusted js scripts for small device compatibility