var ShareToService = function(options) {
	this.options = options;
}

ShareToService.instances = {};
ShareToService.getInstance = function(options, name) {
	if (!name) {
		name = "common";
	}
	if (options) {
		ShareToService.instances[name] = new ShareToService(options)
	}
	return ShareToService.instances[name];
}

ShareToService.prototype.PopupFacebook = function() {
	window.open(
		'http://www.facebook.com/sharer.php?u=' + this.options.url + '&amp;t=' + this.options.title, 
		'', 'location=1,status=1,scrollbars=0,resizable=0,width=530,height=400'
	);
	return false;
}

ShareToService.prototype.PopupFrype = function() {
	window.open(
		'http://www.frype.lt/say/ext/add.php?title=' + encodeURIComponent(this.options.title) + 
			'&link=' + encodeURIComponent(this.options.url) + 
			(this.options.titlePrefix ? '&titlePrefix=' + encodeURIComponent(this.options.titlePrefix) : ''), 
		'', 'location=1,status=1,scrollbars=0,resizable=0,width=530,height=400'
	);
	return false;
}