/* 
 * 
 * InfinityJS (c) Adinfinity 2011, All Rights Reserved 
 * Version : 1.5 
 * 
 * You may not use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
 * of this software without written permission from Adinfinity Pty Ltd. 
 * 
 */
((function(){var a,b,c,d,e;window.A3=new(function(){function a(){}return a.prototype.api={modules:[],watchers:{},version:"1.5",defaultPath:"//cdn.adinfinity.com.au/api",loghistory:[],debug:!1},a.prototype.log=function(a){this.api.loghistory.push({severity:"log",message:a}),typeof console!="undefined"&&console!==null&&this.api.debug===!0&&console.log(a)},a.prototype.onReady=function(a,b){var c;this.api.watchers[a]=(c=this.api.watchers[a])!=null?c:[],this.api.watchers[a].push(b)},a.prototype.ready=function(a){this.api.modules.push(a)},a.prototype.getUrlParam=function(a){var b,c;return c="[\\?&]"+a+"=([^&#]*)",b=window.location.href.match(c!=null?c:""),b?b[1]:null},a.prototype.init=function(a){var b,c,d,e,f,g,h,i,j,k;this.log("A3.base - init");if(a==null)throw"Infinity - Must provide a config object as parameter";this.api.conf=a,i=this.api.modules;for(e=0,g=i.length;e<g;e++){b=i[e],typeof (d=this[b]).init=="function"&&d.init(this.api.conf),k=(j=this.api.watchers[b])!=null?j:[];for(f=0,h=k.length;f<h;f++)c=k[f],c()}},a}()),d=A3,d.api.debug=d.getUrlParam("_infd")==="on",e=d.getUrlParam("_infv")||d.api.version,a=d.getUrlParam("_infl")!=null?!0:!1,c=window.location.protocol==="file:"?"http:":window.location.protocol,e==null&&(e=d.api.version),b=a===!0?"../dist/js":c+d.api.defaultPath,window.document.write("<script type='text/javascript' src='"+b+"/infinity-"+e+".min.js'></script>"),d.log("A3 - V"+e+" © Adinfinity Pty Ltd. All Rights Reserved")})).call(this)
