(function(A){function B(C){return/(http|https):\/\//.test(C)}A.extend({requireConfig:{routeJs:"_js/",routeCss:"_css/"},queue:[],pending:null,requireJs:function(E,K,C,H,L){if(C!=undefined||C==null){A.extend(A.requireConfig,C)}var G={url:E,callback:K,opts:C,obj:H,scope:L};if(this.pending){this.queue.push(G);return }this.pending=G;var J=this;var F=(B(E))?E:A.requireConfig.routeJs+E;var I=document.getElementsByTagName("head")[0];var D=document.createElement("script");A(D).bind("load",function(){J.requestComplete()});D.onreadystatechange=function(){if(this.readyState==="loaded"||this.readyState==="complete"){J.requestComplete()}};D.type="text/javascript";D.src=F;I.appendChild(D)},requestComplete:function(){if(this.pending.callback){if(this.pending.obj){if(this.pending.scope){this.pending.callback.call(this.pending.obj)}else{this.pending.callback.call(window,this.pending.obj)}}else{this.pending.callback.call()}}this.pending=null;if(this.queue.length>0){var C=this.queue.shift();this.requireJs(C.url,C.callback,C.opts,C.obj,C.scope)}},requireCss:function(D){if(document.createStyleSheet){document.createStyleSheet(A.requireConfig.routeCss+D)}else{var C=document.createElement("link");A(C).attr({href:A.requireConfig.routeCss+D,type:"text/css",media:"screen",rel:"stylesheet"}).appendTo(A("head").get(0))}}})})(jQuery);