adding adjust modal for mobile viewing

modals were getting cut off on mobile platforms added a script in js to
try to fix this error.