/*! adriver.core.2 v2.3.9 */ function adriver(ph, prm, defer){ var my = this, p = ph; if(this instanceof adriver){ if(typeof(p)=='string'){ p=document.getElementById(ph); }else{ ph=p.id; } if(!p){ if(!adriver.isDomReady){adriver.onDomReady(function(){new adriver(ph, prm, defer);});} return {}; } if(adriver(ph)){return adriver(ph);} my.p = p; my.defer = defer; my.prm = adriver.extend(prm, {ph: ph}); my.loadCompleteQueue = new adriver.queue(); my.domReadyQueue = new adriver.queue(adriver.isDomReady); adriver.initQueue.push(function(){my.init();}); adriver.items[ph] = my; return my; }else{ return ph ? adriver.items[ph] : adriver.items; } } adriver.prototype = { isLoading: 0, init: function(){}, loadComplete: function(){}, domReady: function(){}, onLoadComplete: function(f){var my = this; my.loadCompleteQueue.push(function(){f.call(my);}); return my;}, onDomReady: function(f){this.domReadyQueue.push(f); return this;}, reset: function(){this.loadCompleteQueue.flush(); this.domReadyQueue.flush(adriver.isDomReady); return this;} }; adriver.extend = function(){ for(var l = arguments[0], i = 1, len = arguments.length, r, j; i