function twit(){
        BitlyCB.shortenResponse = function(data) {
                var s = '';
                var first_result;
                // Results are keyed by longUrl, so we need to grab the first one.
                for     (var r in data.results) {
                        first_result = data.results[r]; break;
                }
				var url = first_result['shortUrl'];
				var t='Check out this T-shirt available at @Glennztees: ';
				window.open('http://twitter.com/home?source=glennztees&status='+encodeURIComponent(t)+url)
        }
        BitlyClient.shorten(document.location.href, 'BitlyCB.shortenResponse');
	}
function emit(selement,starget){
	var e = $(selement);
	var placement = Element.cumulativeOffset($(starget));
	var dleft = placement[0];
	var dtop = placement[1];
	e.style.left = dleft+'px';
	e.style.top = dtop+'px';
	$('ifinfo').removeAttribute('src');
	$('ifinfo').setAttribute('src','http://blog.glennz.com/email/emailpage.html?url='+window.location.href);
	Element.show(e);
}
function clft(fitem){
	var emailfloat = document.getElementById(fitem);
	Element.hide(emailfloat);
}
function repr(selement,starget){
	var e = $(selement);
	var placement = Element.cumulativeOffset($(starget));
	var dleft = placement[0];
	var dtop = placement[1];
	e.style.left = dleft+'px';
	e.style.top = dtop+'px';
	Element.show(e);
}

function diggit(){
	var metatags = document.getElementsByTagName("META");
	var pgdesc = "";
	for (var m in metatags) {
		if (m.name == "description"){
			pgdesc = m.textContent;
		}
	}
	var pgtitle = "Glennz Tees: "+document.title;
	window.open('http://digg.com/submit?phase=2&url='+encodeURIComponent(window.location.href)+'&title='+pgtitle+'&bodytext='+pgdesc);
}

function stumbleit(){
	var pgtitle = "Glennz Tees: "+document.title;
	window.open('http://www.stumbleupon.com/submit?url='+encodeURIComponent(window.location.href)+'&title='+pgtitle);
}
