
	/**
	 *	Share a link via a social network.
	 *
	 *	@param	String type The type of network to share over
	 *	@param	String title [OPT] The title of the page (defaults to this page's title)
	 *	@param	String url [OPT] The url of the page (defaults to this page's url)
	 */
	social.share = function( type, title, url )
	{
		if( title == undefined ) title = this.page_title;
		if( url   == undefined ) url   = this.bitly_shortened_url;
		
		//var id = intVal( Math.random() * 1000000 );
		
		var social_share_link = '';
		
		switch( type )
		{
			case 'share-facebook':
				social_share_link = 'http://www.facebook.com/sharer.php?u='+url+'&t='+title;
				break;
			case 'share-twitter':
				social_share_link = 'http://twitter.com/home?status=Check this out: '+title+' ('+url+')';
				break;
			case 'share-linkedin':
				social_share_link = 'http://www.linkedin.com/shareArticle?mini=true&url='+escape(url)+'&title='+escape(title)+'&source='+escape(this.site_url);
				break;
			case 'share-email':
				social_share_link = 'send-to-a-friend?page='+this.page_b64_url;
				break;
			case 'share-bookmark':
				social.bookmark( title, location.href );
				return false
				break;
		}
		
		$('.'+type+' a').attr('href', social_share_link);
		$('.'+type+' a').attr('target', '_blank');
	};

	
	/**
	 *	Bookmark a link
	 *
	 *	@param	String title [OPT] The title of the page (defaults to this page's title)
	 *	@param	String url [OPT] The url of the page (defaults to this page's url)
	 */
	social.bookmark = function( title, url )
	{
		if( title == undefined ) title = this.page_title;
		if( url   == undefined ) url   = location.href;
		
		if( window.sidebar ) // firefox
		{
			window.sidebar.addPanel( title, url, "" );
		}
		
		else if( window.opera && window.print ) // opera
		{
			var elem = document.createElement('a');
			elem.setAttribute( 'href'	, url 		);
			elem.setAttribute( 'title'	, title 	);
			elem.setAttribute( 'rel'	, 'sidebar' );
			elem.click();
		} 
		else if( document.all ) // ie
		{
			window.external.AddFavorite( url, title );
		}
	};