$(document).ready(function(){$("#breadcrumb1 a").each(function(){$(this).attr("title",$(this).text())});var removedElement=$("#footers2").remove();$("#footers1").before(removedElement);removedElement=$("#ljmulogobanner").remove();$("#pagecontent").before(removedElement);var tallestMenuHeightinPx;var debug_reporter="HOW WERE HANDLING THE BREADCRUMB\n\n";var menus1HeightPx;var menus2HeightPx;var content1Height;var searchInputValue;var elementMainWidthPx;var breadcrumbShortenerAttemptLimit=10;var breadCrumbItemsIterativelyRemoved=0;var breadCrumbLinkTextCharacterCountLimit=25;var numElementsInBreadcrumb;var numElementsInBreadcrumbThrh=3;var measure;var bcW;var bcH;var bcpos;var initialGWOC;var tempnumElementsInBreadcrumb;menus1HeightPx=$("#menus1").height();menus2HeightPx=$("#menus2").height();content1Height=$("#content1").height();(menus1HeightPx>menus2HeightPx)?tallestMenuHeightinPx=menus1HeightPx:tallestMenuHeightinPx=menus2HeightPx;if(tallestMenuHeightinPx>content1Height){$("#content1").css('min-height',tallestMenuHeightinPx+"px")}$('#qt').focus(function(){searchInputValue=$('#qt').attr("value");if(searchInputValue=="Search"){$('#qt').attr("value","")}});$('#searchform').submit(function(){searchInputValue=$('#qt').attr("value");if(searchInputValue=="Search"){$('#qt').attr("value","")}});debug_reporter+="First, truncate any link text over "+breadCrumbLinkTextCharacterCountLimit+" characters\n";debug_reporter+="\n\nKeep checking to see if the number of links exceeds the width of the Breadcrumb trail area";$('<div id=\"bubbleholder\"></div>').prependTo($("body"));elementMainWidthPx=parseInt($('#main').width());if(elementMainWidthPx>730){measure=parseInt(elementMainWidthPx*0.50);$("#breadcrumb1").css('width',measure+'px')}bcW=$("#breadcrumb1").width();bcH=$("#breadcrumb1").height();bcpos=$("#breadcrumb1").position();initialGWOC=getWidthOfContent();if(bcW<initialGWOC){$("#breadcrumb1 a").each(function(){if(($(this).html().length)>breadCrumbLinkTextCharacterCountLimit){debug_reporter+="\n"+"Truncating: '"+$(this).html()+"'";$(this).html($(this).text().substr(0,breadCrumbLinkTextCharacterCountLimit)+"&hellip;")}})}numElementsInBreadcrumb=$("#breadcrumb1 a, #breadcrumb1 span").size();numElementsInBreadcrumbF=$("#breadcrumb1 a").size();s="";$('<span>&hellip;&nbsp;</span>').insertAfter($("#breadcrumb1 span").first());tempnumElementsInBreadcrumb=$("#breadcrumb1 a").size();debug_reporter="";while((breadcrumbShortenerAttemptLimit>0)&&(getWidthOfContent()>$("#breadcrumb1").width())){breadcrumbShortenerAttemptLimit--;debug_reporter+="num link breadcrumb = "+tempnumElementsInBreadcrumb+"----Now removing item: '"+$("#breadcrumb1 a").slice(1,2).html()+"'";if(tempnumElementsInBreadcrumb>=numElementsInBreadcrumbThrh){$("#breadcrumb1 a,#breadcrumb1 span").slice(2,3).remove();breadCrumbItemsIterativelyRemoved++;tempnumElementsInBreadcrumb--}}if(breadCrumbItemsIterativelyRemoved>0){$('<span>&hellip;&nbsp;</span>').insertAfter($("#breadcrumb1 span").first());debug_reporter+="\n\n\n\n"+"Added ellipis between home link and the rest\n\n        ... and we're done     \n\n"}var linkC=0;$("#breadcrumb1 a").each(function(){linkC++;$(this).attr("id","bclink"+linkC);var breadcrumbBubble=$("<div id=\"bubbleholder"+linkC+"\" class=\"bubblehold\"></div>");breadcrumbBubble.append("<div class=\"bubble\">"+$(this).attr("title")+"</div><div class=\"bubblepoint\"></div>");$('#bubbleholder').append(breadcrumbBubble);$(this).attr("title","");var bubbleID="#bubbleholder"+linkC;$(this).mouseenter(function(e){$(bubbleID).css("top",$(this).offset().top+15);$(bubbleID).css("left",$(this).offset().left);$(bubbleID).css("opacity",0.5);$(bubbleID).show();$(bubbleID).animate({opacity:1.0,top:($(this).offset().top+20)},110,function(){})});$(this).mouseleave(function(e){$(bubbleID).animate({opacity:0.59,top:($(this).offset().top+53)},120,function(){$(bubbleID).hide()})})});function getWidthOfContent(){var gwoc=0;$("#breadcrumb1>*").each(function(){gwoc+=$(this).width()});debug_reporter+="\n\n"+"width of the Breadcrumb trail area = "+$("#breadcrumb1").width()+"\nWidth of it's content  = '"+gwoc+"'";if($("#breadcrumb1").width()<=gwoc){debug_reporter+="\n---exceeded or matched, so remove a high level link\n"}return gwoc}});
