if(typeof Ferengi == "undefined") {
	var Ferengi = {
		Version: "1.0"
	};
	Ferengi.namespace = function() {
		var a = arguments,
			o = null,
			i, j, d;
		for(i=0; i<a.length; ++i) {
			d = a[i].split(".");
			o = Ferengi;
			for(j=(d[0]=="Ferengi")?1:0; j<d.length; ++j) {
				o[d[j]]=o[d[j]] || {};
				o=o[d[j]];
			}
		}
		return o;
	};
};
Ferengi.namespace("Pxp");
// Creating a class
Ferengi.Pxp.Feed = new Class({
	Implements: Options,
	options: {
		Id:"",
		Title:""
	},
	initialize: function(options) {
		this.setOptions(options);
		// initialize commands goes here
	}

});
Ferengi.Pxp.Feed.implement({
    write: function() {
        var Id = this.options.Id;
        document.write("<div id='feed" + Id + "'></div>")
        this.load('feed' + Id);
    }
    , load: function(divId) {
        var Id = this.options.Id;
        var Title = this.options.Title;
        var url = '/VotosHL.aspx?ObjectId=' + Id;
        if (Title!="")
        {
            url += '&Title=' + Title;
        }
        //alert(url);
        var myAjaxFeed = new Request({
            url: url,
            method: 'get',
            onSuccess: function(html) {
                var el = $(this.currentDivId);
                el.set('html', html);
                
            },
            evalScripts: true
        });
        myAjaxFeed.send();
        myAjaxFeed.currentDivId = divId;


    }
});

window.addEvent("domready", function () {
    var oo = $$('.SlbfFeed');
    for (var i = 0; i < oo.length; i++) {
        var o = oo[i];

        var Params = "";
        var SlbfFeedId = o.getAttribute('SlbfFeed')
        
        var f = new Ferengi.Pxp.Feed({ Id: SlbfFeedId })
        f.load(o);
    }
});
