$window = $(window) $window.console = function(error){ if (window.MAXPHONICS_DEBUG) if(!$.browser.msie) console.debug("ERROR: ", error) }