var ImageLoader = function(){
};

ImageLoader.prototype = {
    load: function(opt){
	if ( !opt ) {
	    opt = {};
	}
	if ( !opt.offset ) {
	    opt.offset = 0;
	}
	if ( !opt.limit ) {
	    opt.limit = 9;
	}
	if ( !opt.callback ) {
	    opt.callback = "callback";
	}

	if ( !opt.path ) {
	    opt.path = "/";
	}

	var uri = "http://api.shttr.net/json" + opt.path + "?offset=" + opt.offset + "&limit=" +  opt.limit + "&callback=" + opt.callback;
	var script = document.createElement("script");
	script.setAttribute("src",uri);
	document.getElementsByTagName("body")[0].appendChild(script);
    }

};

