jQuery(window).on('load', function() { new JCaption('img.caption'); }); JCEMediaBox.init({popup:{width:"",height:"",legacy:0,lightbox:0,shadowbox:0,resize:1,icons:1,overlay:1,overlayopacity:0.8,overlaycolor:"#000000",fadespeed:500,scalespeed:500,hideobjects:0,scrolling:"fixed",close:2,labels:{'close':'Chiudi','next':'Successivo','previous':'Precedente','cancel':'Annulla','numbers':'{$current} di {$total}'},cookie_expiry:"",google_viewer:0},tooltip:{className:"tooltip",opacity:0.8,speed:150,position:"br",offsets:{x: 16, y: 16}},base:"/",imgpath:"plugins/system/jcemediabox/img",theme:"standard",themecustom:"",themepath:"plugins/system/jcemediabox/themes",mediafallback:0,mediaselector:"audio,video"}); 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)); } });