//<![CDATA[
$(function(){
	$("ul.socialblur li img").each(function() {
		var t=$(this).attr("src");
		$(this).parent().append('<img src="'+t+'" style="left:0px; top:0px; position:absolute"/>');
		$(this).parent().append('<img src="'+t+'" style="right:0px; top:0px; position:absolute"/>');
		$(this).parent().append('<img src="'+t+'" style="left:0px; bottom:0px; position:absolute"/>');
		$(this).parent().append('<img src="'+t+'" style="right:0px; bottom:0px; position:absolute"/>');
	});
	$("ul.socialblur li").hover(function() {
		$('img:eq(0)',$(this)).stop()
			.fadeTo("fast",1.00);								
		$('img:gt(0)',$(this)).stop()
			.fadeTo("slow",0.00);
	},function() {
		$('img:eq(0)',$(this)).stop()
			.fadeTo("slow",0.20);
		$('img:gt(0)',$(this)).stop()
			.fadeTo("slow",0.20);
	});
	var count=0;
	$("pre code").each(function() {
		$(this).get(0).innerHTML=$(this).get(0).innerHTML.replace(/</g,'&lt;');
		var rig=$(this).offset()['left']+490;
		var top=$(this).offset()['top']+10;
		var j=$("<div id='codetools' style='top:"+top+"px; left:"+rig+"px' rel='"+count+"'+></div>");
			$("<div id='ct1' onclick='ct1(event,this)'/>").appendTo(j);
			//$("<div id='ct2' onclick='ct2(this)'/>").appendTo(j);
			j.appendTo('body');
		count++;
	});
});
function ct1(e,t) {
	var c=$("pre code").get($(t.parentNode).attr("rel"));
	var v=$("#htext").get(0);
	if (typeof(v)=="undefined" || v==null) {
		v=$("<textarea id='htext'></textarea>");
		$(v).mouseout(function() {$(this).fadeOut("slow");});
		v.appendTo('body');
	}
	$(v).val($(c).get(0).innerHTML.replace(/&lt;/ig,"<").replace(/&gt;/ig,">").replace(/&amp;/ig,"&"));
	$(v).css({'left':(e.clientX-150),'top':(e.pageY-150)});
	$(v).fadeIn("slow");
	$(v).focus();
	$(v).select();
}
var ts_url=window.location;
var ts_title=document.title;
var ts_twitter='jQueryIt';
function fb() {
window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(ts_url)+'&t='+encodeURIComponent(ts_title),'sharer','toolbar=0,status=0,width=626,height=436');
return false;
}
function tw() {
window.open('http://seoheap.com/twitter.php?status='+encodeURIComponent(ts_title)+'&ac='+encodeURIComponent(ts_twitter)+'&url='+encodeURIComponent(ts_url),'sharer','toolbar=0,status=0,width=626,height=436');
return false;
}
function su() {
window.open('http://www.stumbleupon.com/submit?url='+encodeURIComponent(ts_url),'sharer','toolbar=0,status=0,width=626,height=436');
return false;
}
//]]>
