Update mastercontroller.js

scope variable in document ready