$(function(){
	$('#sharebutton').click(function() {
		$('#article_share').slideToggle('fast');
		return false;
	});
	
	$('#email_link').click(function() {
		$('#article_email').slideToggle('fast');
		return false;
	});
	
	$('.readmore').click(function() {
		$(this).parent().next('.comment_more').show();
		$(this).parent().hide();
		return false;
	});
	
	$('.enlarge .thickbox').hover(function(){
		$(this).parent().find('.enl_overlay').show();
	}, function(){
		$(this).parent().find('.enl_overlay').hide();
	});
	
	/* Text resizing */
	$('#tup').fontscale('.body_copy, .body_comment', "up").click(function(){ return false; });
	$('#tdn').fontscale('.body_copy, .body_comment', "down").click(function(){ return false; });
	$('#tres').fontscale('.body_copy, .body_comment', "reset").click(function(){ return false; });
	
	$("a[href='#print']").bind("click", function(){
		window.print();  
	});
	
	$("#email_link").bind("click", function(){
		pageTracker._trackEvent("Article Events", "Email", "<?php echo $item->slug ?>");
	});
	
	$('.banip').bind("click", function(){
		var banconfirm = confirm("Are you sure? This will permanently ban this user's IP address.");
		if( banconfirm == false ) return false;
	});
	$('.removecomment').bind("click", function(){
		var commentconfirm = confirm("Are you sure? This comment will be unpublished immediately.");
		if( commentconfirm == false ) return false;
	});
});
