jQuery(window).on('load', function() {
new JCaption('img.caption');
});
jQuery(function($){ initTooltips(); $("body").on("subform-row-add", initTooltips); function initTooltips (event, container) { container = container || document;$(container).find(".hasTooltip").tooltip({"html": true,"container": "body"});} });
jQuery.urlShortener.settings.apiKey='AIzaSyB9Z_0jbJ4-cZAis8KkEgZE2iGWFTQd8nE';
jQuery.urlShortener({
longUrl: "",
success: function (shortUrl) {
//shortUrl -> Shortened URL
jQuery("meta[property='og:url']").attr('content',shortUrl);
href=jQuery("#twitterhref").attr('href');
jQuery("#twitterhref").attr('href',href+'&url='+shortUrl);
},
error: function(err)
{
alert(JSON.stringify(err));
}
});
function getUrlVar(key){
var result = new RegExp(key + "=([^&]*)", "i").exec(window.location.search);
return result && unescape(result[1]) || "";
}
if(getUrlVar("post_id")!='') document.write("Il tuo post è stato condiviso con successo!");
else document.write("Operazione annullata.");
setTimeout(function(){window.close();}, 5000);