//debug wrapper for firefox firebug console var jslog = { debug: function () {}, enable: function() { this.debug = console.debug; this.debug('enabling firebug console debugging'); }, disable: function() { this.debug = function(){} } }; if (typeof console != "undefined") { // safari, firebug if (typeof console.debug != "undefined") { // firebug jslog.enable(); //if(window.location.href.indexOf("debug=true")>0) jslog.enable(); } }