/* Author: 

*/
var hidden = true;
$(document).ready(function(){

	//resize long titles
	$("h1, h1 a").each(function(){ if($(this).text().length > 25) { $(this).css("font-size", "20px"); } });
	
	$("#follow").css("position", "relative")
		.append("<img class='popsicle' rel='http://twitter.com/zoster' id='zoe-follow' src='"+theme+"/images/zoe_follow.png' />")
		.append("<img class='popsicle' rel='http://twitter.com/gavinblair' id='gav-follow' src='"+theme+"/images/gav_follow.png' />");
	$("#friend").css("position", "relative")
		.append("<img class='popsicle' rel='http://www.facebook.com/profile.php?id=1398568236' id='zoe-friend' src='"+theme+"/images/zoe_friend.png' />")
		.append("<img class='popsicle' rel='http://www.facebook.com/gav.blair' id='gav-friend' src='"+theme+"/images/gav_friend.png' />");
	$("#feed").css("position", "relative")
		.append("<img class='popsicle' rel='/feed' id='blog-feed' src='"+theme+"/images/blog_feed.png' />")
		.append("<img class='popsicle' rel='/comments/feed' id='comments-feed' src='"+theme+"/images/comments_feed.png' />");
	$(".popsicle").click(function(){
		window.location = $(this).attr("rel");
	});
	$("#follow, #friend, #feed").click(function(){
		if(!hidden) {
			hideall();
		}
		$("#zoe-"+$(this).attr('id')+", #blog-"+$(this).attr('id')).animate({
			right: '-500px',
			top: '-100px'
		}, 500);
		$("#gav-"+$(this).attr('id')+", #comments-"+$(this).attr('id')).animate({
			right: '-500px',
			top: '25px'
		}, 500);
		hidden = false;
		return false;
	});
	var t = setTimeout(function(){
		$("#easteregg img").show();
		$("#easteregg img").draggable({revert: true, axis: 'x', revertDuration: '100'});
	}, 3000);
	
});

function hideall(){
	$("#right a .popsicle").animate({
		right: '-864px',
		top: '0px'
	}, 500);
	hidden = true;
}




















