added init mobile check in scripts.js