$(function() {
	
	// global vars
	var currentPath = location.pathname;
	
	// changes to authentication pages
	if (currentPath == "/people.php") {
		
		// add the top rounded corners
		$("#SiteContainer").before("<div id='SiteContainerHead'>&nbsp;</div>");
		
		// add the bottom rounded corners
		$("#SiteContainer").after("<div id='SiteContainerFoot'>&nbsp;</div>");	
		
		// clear the floated elements
		$("ul.MembershipOptionLinks").addClass("clearfix");
		
	}
	
	//change to comments pages
	if (currentPath == "/comments.php") {
		
		// find empty breadcrumb links and remove them
		$(".ContentInfo h1 a").each(function() {
			if ($(this).text() == "") {
				$(this).hide();	
			}
		});
		
		// add a wrapper to the comments for extra css
		$("ol#Commments").wrap("<div id='CommentsWrapper'></div>");
		
	}
	
	// changes to category pages
	if (currentPath == "/categories.php") {
		
		// clear the floated elements
		$("#Categories").after("<div class='clear'>&nbsp;</div>");
		
	}
	
	// changes to account pages
	if (currentPath == "/account.php") {
		
		// clear the floated elements
		$("#AccountHistory").after("<div class='clear'>&nbsp;</div>");
		
		// remove the clearfix
		$("#AccountProfile .vcard li").removeClass("clearfix");
		
		// equalize the Account Histoy and Profile heights
		if ($("#AccountHistory").text() != "") {
			if($("#AccountHistory").height() < $("#AccountProfile").height()) {
				$("#AccountHistory").height($("#AccountProfile").height());	
			}
		}
		
	}
	
	// equalize the main and sub column heights
	var mainCol = $("#Content");
	var subCol = $("#Panel");
	if (mainCol.height() < subCol.height()) {
		mainCol.height(subCol.height());	
	}
	
});
