__ = { handler: { svg: function(data) { var appendPoint = (arguments.callee.appendPoint ? arguments.callee.appendPoint : "svg") ; $(appendPoint).append($(data)); }, jquery: function(data) { eval(data); } }, load: function(type, urn, handler) { // this.load('jquery', '.../format/' + type + '/jquery'); if(!handler) handler = this.handler[type]; if(typeof handler != "undefined") { // XML documents loaded in jquery if(!urn.endsWith('/')) urn += '/'; $.get(urn + type, {}, handler, 'text'); } else { switch(type) { case 'style': document.insertBefore (document.createProcessingInstruction("xml-stylesheet", 'type="text/css" href="' + urn + '"'), document.firstChild); } } } }; $(document).ready(function() { if(__.init) __.init() });