jQuery(document).ready(function($) {
	BitlyCB.shortenResponse = function(resp) {
		for ( var url in resp.results ) {
			var hash = resp.results[url].userHash;			;

			$('a.share_to_twitter').each(function(i,e){ 
				e.href += ' http://bit.ly/' + hash;
			});
		}
	}
	
	BitlyClient.shorten(window.location, 'BitlyCB.shortenResponse');
	$('a.sharebutton').hover(function() { $(this).fadeTo(0, 1) }, function() { $(this).fadeTo(0, 0.7) });	
});

