﻿// *****************************************************************
// JQuery Scripts for the AACC Master Page
// v1.1
// Terraping Systems terpsys.com
// *****************************************************************

$(document).ready(function() {

	// ** Will remove last menu item separator image from left menu
	$("a.left-sidebar-menu-item:visible").last().css({"background-image":"url('noimagedividerurl')"});

	//RunCleanupOnInterval();


}); // End of document.load ready block

var TimerID; //Stores the timerID of the interval being run so it can be disabled after a period of time

//Runs the displayname cleanup on an interval for a shorttime then clears the interval
function RunCleanupOnInterval()
{
	TimerID = setInterval('cleanupDisplayNames()', 50);
	setTimeout('clearTimeout(TimerID)', 1000);
}

function cleanupDisplayNames()
{
	// ** Will Remove the SP Membership provider prefix from user names displayed in welcome control and Blog Posts, etc
	var provider = 'i:0#.f|sqlmembershipprovider|';
	$("a:contains(provider)").each(function(index) { $(this).text($(this).text().substr(provider.length)); });


}

/* Comented to stop execution of user id cleanup code

	
	
	function pageLoad(sender, args)
	{
		RunCleanupOnInterval();
	}
	
	
	SP.SOD.executeOrDelayUntilScriptLoaded(RunCleanupOnInterval, "socialcomment.js");

*/
