if(typeof window.console == 'undefined') { window.console = {log: function (msg) {}, warn: function (msg) {}, error: function (msg) {}}; }