var DEBUG=true;(function(a){if(!("console" in window)){a(function(){var d=["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd"];var b=a("<ol></ol>");var e=a('<div id="DEBUG"></div>').appendTo("body");e.append(b);window.console={};for(var c=0;c<d.length;++c){window.console[d[c]]=function(f){b.append("<li>"+f+"</li>");e.scrollTop(e[0].scrollHeight)}}})}a.fn.debug=function(){return this.each(function(){a.log(this)})};a.log=function(d){if(window.DEBUG){var e=d;if(!("console" in window)){if(typeof(d)=="object"){if(d.nodeName){e="&lt;";e+=d.nodeName.toLowerCase();for(var c=0;c<d.attributes.length;c++){e+=" "+d.attributes[c].nodeName.toLowerCase()+'="'+d.attributes[c].nodeValue+'"'}e+="&gt;"}else{for(var b in d){e+=b+" : "+(d[b])+", "}}}}console.log(e)}}})(jQuery);