/**
 * @author Jacky
 */
	//class for loading js to head section of the html
	function ba_obj(){
		this.rjs_url = "http://static.blogarate.com/blogger_widget.js";
		//this.rjs_url = "blogger_widget.js";
		this.jq_url = "http://static.blogarate.com/jquery-1.2.3.min.js";
	};
	
	
	
	
	ba_obj.prototype.create = function(){
		var script_loaded=function(script){
			script.parentNode.removeChild(script);
			this.widget = new widget();
		};
		var head = document.getElementsByTagName('head')[0];
		
		//main script
		var script = document.createElement('script');
		script.type = 'text/javascript';
		script.src = this.rjs_url;
		script.onreadystatechange=function(){
			if((this.readyState=="complete")||(this.readyState=="loaded")){
				script_loaded(this);
				}
			};
		script.onload=function(){
			script_loaded(this);
		};
		
		
		//jquery
		var jscript = document.createElement('script');
		jscript.type = 'text/javascript';
		jscript.src = this.jq_url;
		jscript.onreadystatechange=function(){
			if((this.readyState=="complete")||(this.readyState=="loaded")){
				head.appendChild(script);
				}
		}		
		jscript.onload=function(){
			head.appendChild(script);
		};
		
		head.appendChild(jscript);
		
	};
	
	var js_load = new ba_obj();
	js_load.create();
	
