var MAG = Object.extend({}, MAG || {});
MAG.Bookmark = Class.create();
MAG.Bookmark.prototype = {
	initialize: function()
	{
		MAG.Bookmark = this;
		return true;
	},

	add: function(offer_id)
	{
		MAG.MagAjax.make_response(_root + 'my/bookmark', 'offer_id='+offer_id, 'post', this.boomark_complete.bind(this));
	},

	boomark_complete: function(req) {
		try {
			eval(req.responseText.toString().unfilterJSON());
		} catch(e) {
			alert(bookmark_messages.not_logged);
		}
	}
};
new MAG.Bookmark;
