(function($){$.fn.jshare=function(b){var c={jsharedir:'./jshare/',title:'<strong>Coloque nas Redes Sociais, bookmark, mande por email ou imprima</strong>',highlight:false,share:'facebook,twitter,digg,print,google_buzz,delicious,stumbleupon,orkut,tumblr,linkedin,myspace,yahoo_buzz,bebo,mixx,friendfeed',bookmark:'favorites,google,yahoo,live,digg,squidoo',iconsdir:'./jshare/images/icons/',imageextension:'png',opentab:'share',blanktarget:true,stickybutton:true,emailform:false,shareurl:'',sharetitle:'',overlay:true,overlayopacity:0.3,overlaycolor:'#000',speedin:300,speedout:300};var d=$.extend({},c,b);var e=window.XMLHttpRequest;if(e){$("head").append("<link />");$("head").children(":last").attr({"rel":"stylesheet","type":"text/css","href":d.jsharedir+'style.css'})}var f=['<div id="jshare_box">','<div id="jshare_close" />','<div id="jshare_content"><div id="share_content">','<div class="jshare_title">'+d.title+'</div>','<div id="jshare_nav">','<table width="100%" border="0" cellspacing="2"><tr><td><p><a href="javascript:void(0);" id="jshare_share_link" title="Redes Sociais" class="jshare_tip"><img src="'+d.jsharedir+'images/share.png" /></a></p></td></tr><tr><td><p><a href="javascript:void(0);" id="jshare_bookmark_link" title="Bookmark" class="jshare_tip"><img src="'+d.jsharedir+'images/bookmark.png" /></a></p></td></tr><tr><td><p><a href="javascript:void(0);" id="jshare_email_link" title="Email" class="jshare_tip"><img src="'+d.jsharedir+'images/email.png" /></a></p></td></tr></table>','</div><div id="jshare_main">','<div id="jshare_share" /><div id="jshare_bookmark" /><div id="jshare_email" />','</div><div style="clear: both"></div></div></div></div>'];overlay=$('<div id="jshare-overlay" class="jshare_close" />');if(d.overlay){overlay.css({'background-color':d.overlaycolour,'opacity':d.overlayopacity})}else{overlay.css({'opacity':'0.0'})}if(e){$('body').append(f.join(''),overlay);if(d.stickybutton){var g=$('<a href="javascript:void(0);" id="jshare_button" class="jshare" title="Share and Bookmark this page"><img src="'+d.jsharedir+'images/jbutton.png" border="0" /></a>');$('body').append(g).fadeIn(d.speedin)}}close_button=$('<a href="javascript:void(0);" class="jshare_close"><img border="0" src="'+d.jsharedir+'images/jshare_close.png" alt="close" /></a>').appendTo('#jshare_close');$('.jshare_close').click(function(){$('#jshare_box').fadeOut(d.speedout);overlay.fadeOut(d.speedout);$('#jshare_email').fadeOut();$('#jshare_bookmark').fadeOut();$('#jshare_share').fadeOut()});if(e){$('.jshare').click(function(){$('#jshare_box').fadeIn(d.speedin);$('#jshare_'+d.opentab).fadeIn(d.speedin);overlay.fadeIn(d.speedin)});$('.jshare_share').click(function(){$('#jshare_box').fadeIn(d.speedin);$('#jshare_share').fadeIn(d.speedin);overlay.fadeIn(d.speedin)});$('.jshare_bookmark').click(function(){$('#jshare_box').fadeIn(d.speedin);$('#jshare_bookmark').fadeIn(d.speedin);overlay.fadeIn(d.speedin)});$('.jshare_email').click(function(){$('#jshare_box').fadeIn(d.speedin);$('#jshare_email').fadeIn(d.speedin);overlay.fadeIn(d.speedin)})}$('#jshare_share_link').click(function(){$('#jshare_email').fadeOut(function(){$('#jshare_bookmark').fadeOut(function(){$('#jshare_share').fadeIn(d.speedin)})})});$('#jshare_bookmark_link').click(function(){$('#jshare_email').fadeOut(function(){$('#jshare_share').fadeOut(function(){$('#jshare_bookmark').fadeIn(d.speedin)})})});$('#jshare_email_link').click(function(){if(d.emailform){$('#jshare_bookmark').fadeOut(function(){$('#jshare_share').fadeOut(function(){$('#jshare_email').fadeIn(d.speedin)})})}else{window.location.href="mailto:?subject=Veja isso: "+document.title+"&body= Eu recomendo: "+document.title+".%0D%0A "+document.location.href}});var h=d.blanktarget?'target="_blank"':'';var j;function jshare_metakeywords(){if(k===undefined){metaCollection=document.getElementsByTagName('meta');for(i=0;i<metaCollection.length;i++){nameAttribute=metaCollection[i].name.search(/keywords/);if(nameAttribute!=-1){j=metaCollection[i].content;return j}}}else{return j}}var k;function jshare_metadescription(){if(k===undefined){metaCollection=document.getElementsByTagName('meta');for(i=0;i<metaCollection.length;i++){nameAttribute=metaCollection[i].name.search(/description/);if(nameAttribute!=-1){k=metaCollection[i].content;return k}}}else{return k}}function jshare_url(){if(d.shareurl){return d.shareurl}else{return document.location.href}}function jshare_title(){if(d.sharetitle){return d.sharetitle}else{return document.title}}function encodeURL(a){if(a===undefined){return""}return a.replace(/\s/g,'%20').replace('+','%2B').replace('/%20/g','+').replace('*','%2A').replace('/','%2F').replace('@','%40')}if(d.emailform){$("#jshare_email").load(d.jsharedir+"email/email_form.php?dir="+d.jsharedir+"&url="+encodeURL(jshare_url())+"&title="+encodeURL(jshare_title()));var l='javascript:void(0);" onClick="email_this();" target="_self'}else{var l='mailto:?subject=Veja isso {TITLE}&body= Eu recomendo {TITLE}.%0D%0A {URL} %0D%0A {DESCRIPTION}" target="_self'}var m=Array();m.digg="http://digg.com/submit?phase=2&url={URL}&title={TITLE}";m.linkedin="http://www.linkedin.com/shareArticle?mini=true&url={URL}&title={TITLE}&summary={DESCRIPTION}&source=";m.technorati="http://www.technorati.com/faves?add={URL}";m.delicious="http://del.icio.us/post?url={URL}&title={TITLE}";m.yahoo="http://myweb2.search.yahoo.com/myresults/bookmarklet?u={URL}&t={TITLE}";m.google="http://www.google.com/bookmarks/mark?op=edit&bkmk={URL}&title={TITLE}";m.newsvine="http://www.newsvine.com/_wine/save?u={URL}&h={TITLE}";m.reddit="http://reddit.com/submit?url={URL}&title={TITLE}";m.live="https://favorites.live.com/quickadd.aspx?marklet=1&mkt=en-us&url={URL}&title={TITLE}&top=1";m.facebook="http://www.facebook.com/share.php?u={URL}";m.twitter="http://twitter.com/?status={TITLE}%20-%20{URL}";m.stumbleupon="http://www.stumbleupon.com/submit?url={URL}&title={TITLE}";m.orkut="http://promote.orkut.com/preview?nt=orkut.com&tt={TITLE}&du={URL}&cn={DESCRIPTION}";m.bebo="http://www.bebo.com/c/share?Url={URL}&title={TITLE}";m.email=l;m.evernote="http://s.evernote.com/grclip?url={URL}&title={TITLE}";m.mixx="http://www.mixx.com/submit?page_url={URL}&title={TITLE}";m.myspace="http://www.myspace.com/Modules/PostTo/Pages/?u={URL}&title={TITLE}";m.netvibes="http://www.netvibes.com/share?title={TITLE}&url={URL}";m.tumblr="http://www.tumblr.com/share?v=3&u={URL}&t={TITLE}&s=";m.google_buzz="http://www.google.com/reader/link?url={URL}&title={TITLE}&srcURL={URL}";m.friendfeed="http://friendfeed.com/share/bookmarklet/frame#title={TITLE}&url={URL}";m.print='javascript:void(0);" onClick="print_page();" target="_self';m.favorites='javascript:void(0);" onClick="bookmark_us();" target="_self';m.design_moo="http://www.designmoo.com/node/add/drigg/?url={URL}&title={TITLE}";m.design_float="http://www.designfloat.com/submit.php?url={URL}&title={TITLE}";m.design_bump="http://www.designbump.com/node/add/drigg/?url={URL}&title={TITLE}";m.squidoo="http://www.squidoo.com/lensmaster/bookmark?{URL}";m.yahoo_buzz="http://buzz.yahoo.com/buzz?targetUrl={URL}&headline={TITLE}&summary={DESCRIPTION}";var n=d.share.split(",");for(var o in n){if(d.share){var p=n[o];var q=p.replace(/_/gi," ");var r=m[p];if(r!==undefined){r=r.replace("{TITLE}",encodeURL(jshare_title()));r=r.replace("{URL}",encodeURL(jshare_url()));r=r.replace("{KEYWORDS}",encodeURL(jshare_metakeywords()));r=r.replace("{DESCRIPTION}",encodeURL(jshare_metadescription()));var s='<a href="'+r+'" class="jshare_button" title="'+q+'" '+h+'><img border="0" src="'+d.iconsdir+q+'.'+d.imageextension+'" align="absmiddle" />	'+q+'</a>';if(e){$(s).appendTo('#jshare_share')}}}}var t=d.bookmark.split(",");for(var o in t){if(d.bookmark){var p=t[o];var q=p.replace(/_/gi," ");var r=m[p];if(r!==undefined){r=r.replace("{TITLE}",encodeURL(jshare_title()));r=r.replace("{URL}",encodeURL(jshare_url()));r=r.replace("{KEYWORDS}",encodeURL(jshare_metakeywords()));r=r.replace("{DESCRIPTION}",encodeURL(jshare_metadescription()));var u='<a href="'+r+'" class="jshare_button" title="'+q+'" '+h+'><img border="0" src="'+d.iconsdir+q+'.'+d.imageextension+'" align="absmiddle" />	'+q+'</a>';if(e){$(u).appendTo('#jshare_bookmark')}}}}if(d.highlight){$("#jshare_main a").fadeTo("fast",0.7).hover(function(){$(this).fadeTo("fast",1.0)},function(){$(this).fadeTo("fast",0.7)})}var v=document.createElement('script');v.type='text/javascript';v.src=d.jsharedir+'jshare_tip.js';$("body").append(v);return this}})(jQuery);function print_page(){$('#jshare-overlay').fadeOut('slow');$('#jshare_box').fadeOut('slow',function(){window.print()})}function bookmark_us(){alert('Press ctrl + D to bookmark')}
