(function($){$.fn.social=function(custom){var defaults={buttons:"Facebook,Twitter,Linkedin,Digg,Technorati,Delicious,Yahoo,Google,Live,Newsvine,Reddit,Stumbleupon,Misterwong,Mail",imagedir:"images/16/",imageextension:"png",highlight:true,blanktarget:true,shorturl:""};var settings=$.extend({},defaults,custom);var social=this;var target=settings.blanktarget?'target="_blank"':'';var buttons=settings.buttons.split(",");for(key in buttons){var name=buttons[key];var url=jformat[buttons[key]];if(url!=undefined){url=url.replace("{TITLE}",urlencode(social_title()));url=url.replace("{URL}",urlencode(social_url()));url=url.replace("{SHORTURL}",urlencode(social_short_url()));url=url.replace("{KEYWORDS}",urlencode(social_metakeywords()));url=url.replace("{DESCRIPTION}",urlencode(social_metadescription()));var sociallink='<a '+target+' href="'+url+'" class="social_button social_tip" title="Add to '+name+'"><img border="0" src="'+settings.imagedir+name+'.'+settings.imageextension+'" rel="noindex,nofollow" /></a>';this.append(sociallink);}}
if(settings.highlight){this.find(".social_button").bind("mouseover",function(){$(this).siblings().stop().animate({"opacity":0.2},500);});this.find(".social_button").bind("mouseout",function(){$(this).siblings().stop().animate({"opacity":1},500);});}
var social_keywords;function social_metakeywords(){if(social_description==undefined){metaCollection=document.getElementsByTagName('meta');for(i=0;i<metaCollection.length;i++){nameAttribute=metaCollection[i].name.search(/keywords/);if(nameAttribute!=-1){social_keywords=metaCollection[i].content;return social_keywords;}}}else{return social_keywords;}}
var social_description;function social_metadescription(){if(social_description==undefined){metaCollection=document.getElementsByTagName('meta');for(i=0;i<metaCollection.length;i++){nameAttribute=metaCollection[i].name.search(/description/);if(nameAttribute!=-1){social_description=metaCollection[i].content;return social_description;}}}else{return social_description;}}
function social_title(){return document.title;}
function social_url(){var temp=document.location.href;return temp;}
function social_short_url(){if(settings.shorturl==""){return social_url();}else{return settings.shorturl;}}
function urlencode(string){if(string==undefined){return"";}
return string.replace(/\s/g,'%20').replace('+','%2B').replace('/%20/g','+').replace('*','%2A').replace('@','%40');}
function highlight(element,state){if(state){element.style.opacity=1;element.childNodes[0].style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity=100);";}else{element.style.opacity=highlight_opacity/100;element.style.filter="alpha(opacity=20)";element.childNodes[0].style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+highlight_opacity+");";}}
return this;}})(jQuery);var jformat=Array();jformat['Facebook']="http://www.facebook.com/share.php?u={URL}";jformat['Twitter']="http://www.twitter.com/?status={SHORTURL}";jformat['Linkedin']="http://www.linkedin.com/shareArticle?mini=true&url={URL}&title={TITLE}&summary={DESCRIPTION}&source=";jformat['Digg']="http://www.digg.com/submit?phase=2&url={URL}&title={TITLE}";jformat['Technorati']="http://www.technorati.com/faves?add={URL}";jformat['Delicious']="http://www.del.icio.us/post?url={URL}&title={TITLE}";jformat['Yahoo']="http://myweb2.search.yahoo.com/myresults/bookmarklet?u={URL}&t={TITLE}";jformat['Google']="http://www.google.com/bookmarks/mark?op=edit&bkmk={URL}&title={TITLE}";jformat['Live']="http://favorites.live.com/quickadd.aspx?marklet=1&mkt=en-us&url={URL}&title={TITLE}&top=1";jformat['Newsvine']="http://www.newsvine.com/_wine/save?u={URL}&h={TITLE}";jformat['Reddit']="http://www.reddit.com/submit?url={URL}&title={TITLE}";jformat['Stumbleupon']="http://www.stumbleupon.com/submit?url={URL}&title={TITLE}";jformat['Misterwong']="http://www.mister-wong.com/add_url/?bm_url={URL}&bm_title={TITLE}&bm_comment=&bm_tags={KEYWORDS}";jformat['Mail']="mailto:someone@email.com?SUBJECT={TITLE}&BODY={DESCRIPTION} - {URL}";
