var navigationFixer = function() {}

navigationFixer.prototype.init = function () {
	this.navULs = $("#access div.menu ul.children");

	for (var i = 0; i < this.navULs.length; i++) {
		var theseLIs = this.navULs[i].children;
		
		for (var j = 0; j < theseLIs.length; j++) {
			var thisURLExploded = ($(theseLIs[j]).find("a").attr("href")).split("/");
			console.log(thisURLExploded);
			thisURLExploded[thisURLExploded.length-3] = thisURLExploded[thisURLExploded.length-3] + "#" + j;
			thisURLExploded.splice(thisURLExploded.length-2,2);
			$(theseLIs[j]).find("a").attr("href", thisURLExploded.join("/"));
		}
	}
}

navigationFixer.prototype.stripTitles = function () {
	var linkArr = $("div.menu li a")
	
	for (var i = 0; i < linkArr.length; i++) {
		$(linkArr).attr("title", "");
	}
} 

$(document).ready(function() {
	var nav = new navigationFixer();
	nav.init();
	nav.stripTitles(); //client demanded that "those yellow boxes" go away from the nav menu. Describing accessibility benefits didn't stick :(
});


