/* @ottman Something like this: */
function escapeRegExp(string) {
return string.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
}
function replaceAll(find, replace, str) {
return str.replace(new RegExp(find, 'g'), replace);
}
function Share() {}
var share = new Share();
Share.prototype.share_url = function(url) {
var title = jQuery("#share-dialog-title").html();
var content = jQuery("#share-dialog-content").html();
url = encodeURIComponent(url);
content = replaceAll("{url}", url, content);
window.show(title, content);
return (false);
};