$(document).ready(function(){
    
	// Quick Tip
	$("#publicProfileQuickTipToggle").hover(function(){
			$("#publicProfileQuickTip").show();
		},
		function(){
			$("#publicProfileQuickTip").hide();
		}
	);
	
	// Profile Sport Navigation
	$("#profileNavigationMenu li div").click(function(){
		$(".profileNavigationActive").removeClass("profileNavigationActive");
		$(this).addClass("profileNavigationActive");
		$(".publicProfileSportContainer").hide();
		
		var tempID = $(this).attr("id");
		var tempSport = tempID.substring(tempID.indexOf("-")+1);
		
		$("#publicProfileSport-" + tempSport).show();
	});
	
	$(".commentSubFormToggle").click(function(){
		$(".commentReplyForm").hide();
		$(this).parent().parent().children(".commentReplyForm").show();
	});
	
	$(".commentsSubToggle").click(function(){
		
		if($(this).hasClass("subCommentsVisible"))
		{
			//hide the sub comments
			$(this).next(".commentsSubContainer").children(".commentsSubContainerHidden").hide();
			$(this).children("img").attr("src","/images/global/comments/buttons/expand.jpg");
			$(this).removeClass("subCommentsVisible");
		}
		else
		{
			// Show the sub comments
			$(".commentReplyForm").hide();
			$(this).next(".commentsSubContainer").children(".commentsSubContainerHidden").show();
			$(this).parent().children(".commentReplyForm").show();
			$(this).children("img").attr("src","/images/global/comments/buttons/collapse.jpg");
			$(this).addClass("subCommentsVisible");
		}
		
	});

});

