// load Library Thing scripts loadScriptLTFL(); // retrieve policies getPolicies(); // wait for document to be ready then jQuery(document).ready(function () { // call functions based on what page is displayed var pageURL = jQuery(location).attr('href'); // kids catalog if (pageURL.indexOf("/client/school/") >= 0) { kidscatalog(pageURL); } // login page or box if (pageURL.indexOf("patronlogin") >= 0) { patronLogin(); // my account pages } else if (pageURL.indexOf("search/account") >= 0) { myAccount(); // reserves results page } else if (pageURL.indexOf("results/results") >= 0) { setTimeout("reservesResults();", 500); // reserves detail page } else if (pageURL.indexOf("federateddetailnonmodal") >= 0) { reservesDetail(); // search results page } else if (pageURL.indexOf("results") >= 0) { searchResults(); // my lists page } else if (pageURL.indexOf("mylists") >= 0) { searchResults(); // detail display page } else if (pageURL.indexOf("search/detailnonmodal") >= 0) { detailDisplay(); } }); function patronLogin() { // insert PIN info and contact link based on profile var theProfile = jQuery(location).attr('href').split('/')[4]; var theLabel = 'What\'s my PIN?'; var theURL = ''; if (theProfile == 'testy') { theURL = 'http://consortiumlibrary.org/services/library_account.php'; } else if (theProfile == 'apl') { theURL = 'http://libguides.anchoragelibrary.org/MyAccount'; } else if (theProfile == 'uaa') { theURL = 'http://consortiumlibrary.org/services/library_account.php'; } if (theURL != '') { jQuery('input.loginButton').after('
' + theLabel + '  '); } } function myAccount() { // replace the bad title links on the page jQuery('a.detailLink').each(function () { var theLabel = jQuery(this).text(); var theURL = jQuery(this).attr('href'); theURL = theURL.replace(/account\.checkouts\.checkoutslist\.detaillink\.detailclick\/\d+/g, 'detailnonmodal'); theURL = theURL.replace(/account\.fines\.personal\.detaillink\.detailclick\/\d+/g, 'detailnonmodal'); theURL = theURL.replace(/account\.holds\.holdslist\.detaillink\.detailclick\/\d+/g, 'detailnonmodal'); jQuery(this).after('' + theLabel + ''); jQuery(this).text(''); }); } function reservesResults() { //Change title links so they open in new window jQuery('div.federatedDetailLink .displayElementText a').each(function () { jQuery(this).attr("target", "_blank"); }); } function reservesDetail() { // find first item number var itemBarcode = jQuery('table.detailItemTable td:first').text(); // use item barcode to retieve catkey because enterpise is to stupid to give it to us by default jQuery.getJSON('http://jlc-web.uaa.alaska.edu:8080/symws/rest/standard/lookupTitleInfo?clientID=DS_CLIENT&itemID=' + itemBarcode + '&includeItemInfo=true&json=true&callback=?', function (data) { var catKey = data.TitleInfo[0].titleID; //if there is a catkey, open new window to detail display if (catKey) { var theURL = jQuery(location).attr('href').split('federateddetailnonmodal/')[0] + 'results?qu=%22' + catKey + '%22'; jQuery('div#nm_federated_detail_wrapper').text('Redirecting...'); window.location.replace(theURL); } else { jQuery('div#nm_federated_detail_wrapper').text('This record is shadowed and cannot be displayed in the library catalog.'); } }); } function searchResults() { //var availTitle = jQuery('#onlyAvailableForm .button').attr('title'); //jQuery('#onlyAvailableForm .button').attr('value', ''); //if (availTitle.indexOf("only") >= 0) { //} else { //jQuery('#onlyAvailableForm .button').css('background-image', 'url(http://consortiumlibrary.org/assets/images/buttons/on.jpg)'); //} // loop through dom for each item in results jQuery('div.cell_wrapper').each(function () { thisResult = jQuery(this); // cleanup citations cleanupResults(thisResult); // display holdings showHoldingsResults(thisResult); }); // cleanup the 856 field cleanup856(); } function detailDisplay() { // cleanup citations cleanupDetail(); // format 856 field cleanup856(); // display marc bib fields getMarcBiblio(); // display holdings showHoldingsDetail(); } function showHoldingsResults(thisResult) { // get the profile name var theProfile = getProfile(); // get the url to the detail display var detailURL = jQuery(thisResult).find('.displayDetailLink a').attr('href'); // get the catKey from the detail url var catKey = detailURL.split('SD_ILS:')[1].split('/')[0]; // insert a detail display link on search results as default in case json call fails jQuery(thisResult).find('div.results_bio').append('
Check availability
'); // insert css class that will make it easier to cleanup 856s jQuery(thisResult).find('div.JLCELECTRONIC_ACCESS a').addClass('856_' + catKey); jQuery('.856_' + catKey).hide(); // get item holdings data var boundTo = "no"; getCopies(catKey, theProfile, boundTo); // get bound with getBoundwith(catKey, theProfile); // check to see if there are serial holdings getMarcHoldings(catKey, theProfile); } function showHoldingsDetail(thisResult) { //loop through dom for each item in results jQuery('div#nm_detail_wrapper').each(function () { // get the profile name var theProfile = getProfile(); //get the catkey var pageURL = jQuery(location).attr('href'); var catKey = pageURL.split('SD_ILS:')[1].split('/')[0]; // insert a unique placeholder for copy info based on catkey jQuery(this).find('div.detail_biblio').append('
 
'); // insert a fail message on detial page as default in case json call fails jQuery(this).append('
'); // get item holdings data var boundTo = "no"; getCopies(catKey, theProfile, boundTo); // get bound with getBoundwith(catKey, theProfile); // check to see if there are serial holdings getMarcHoldings(catKey, theProfile); // end loop through dom }); } function getBoundwith(catKey, theProfile) { // json call to web services api and loop through results jQuery.getJSON('http://jlc-web.uaa.alaska.edu:8080/symws/rest/standard/lookupTitleInfo?clientID=DS_CLIENT&titleID=' + catKey + '&includeItemInfo=true&includeBoundTogether=true&json=true&callback=?', function (data) { // if boundwith then loop through array if (data.TitleInfo[0].BoundwithLinkInfo) { boundInfo = data.TitleInfo[0].BoundwithLinkInfo; // loop through boundinfo array returned by json jQuery.each(boundInfo, function (i, value) { // if there is a linked title, get copy info for the linked title if (this.linkedAsParent == true) { var boundCatKey = this.linkedTitle.titleID; var boundTo = catKey; getCopies(boundCatKey, theProfile, boundTo); } }); } }); } function getCopies(catKey, theProfile, boundTo) { // set variable to test for holdable copies var holdableCopies = "no"; // json call to web services api and loop through results jQuery.getJSON('http://jlc-web.uaa.alaska.edu:8080/symws/rest/standard/lookupTitleInfo?clientID=DS_CLIENT&titleID=' + catKey + '&includeItemInfo=true&json=true&callback=?', function (data) { // create list for items var itemsArray = []; // list for items at local library or group of libraries (based on profile) var itemsArrayTop = []; // list for items that are eresources var eresourcesArray = []; // jump down into array returned by json copyInfo = data.TitleInfo[0].CallInfo; //var thisDump = JSON.stringify(data); //jQuery('#nm_detail_wrapper').after('

DUMP

'+thisDump); // loop through copyInfo array returned by json jQuery.each(copyInfo, function (i, value) { // get library description var LibraryDesc = ''; if (this.libraryID && (LibraryList != "")) { LibraryDesc = getDescription(this.libraryID, LibraryList); } else if (this.libraryID) { LibraryDesc = this.libraryID; } // get call number var callInfo = ''; if (this.callNumber) { callInfo = this.callNumber; } if (this.ItemInfo) { // loop through itemInfo array returned by json jQuery.each(value.ItemInfo, function () { // get home location var HomeLocDesc = ''; if (this.homeLocationID && (LocationList != "")) { HomeLocDesc = getDescription(this.homeLocationID, LocationList); } else if (this.homeLocationID) { HomeLocDesc = this.homeLocationID; } // get current location var CurrentLocDesc = ''; if (this.currentLocationID && (LocationList != "")) { CurrentLocDesc = getDescription(this.currentLocationID, LocationList); } else if (this.currentLocationID) { CurrentLocDesc = this.currentLocationID; } // get item type var ItemTypeDesc = ''; if (this.itemTypeID && (ItemTypeList != "")) { ItemTypeDesc = getDescription(this.itemTypeID, ItemTypeList); } else if (this.itemTypeID) { ItemTypeDesc = this.itemTypeID; } // replace some annoying labels from Symphony policies with Enterprise friendly ones LibraryDesc = cleanupLibraryDesc(HomeLocDesc, LibraryDesc); HomeLocDesc = cleanupLocDesc(HomeLocDesc); ItemTypeDesc = cleanupItemTypeDesc(ItemTypeDesc); CurrentLocDesc = cleanupLocDesc(CurrentLocDesc); // get public note if it exists var itemNote = ''; if (this.publicNote) { itemNote = ' (' + this.publicNote + ')'; } // create status if current and home location are not equal // if current location is reserves make status blank var itemStatus = ''; if (CurrentLocDesc != HomeLocDesc) { itemStatus = '--' + CurrentLocDesc; } if (CurrentLocDesc.indexOf("Reserve") >= 0) { itemStatus = ''; } // for APL libraries, make general collection location blank if ((HomeLocDesc.indexOf("General Collection") >= 0) && (LibraryDesc.indexOf("APL") >= 0)) { HomeLocDesc = ''; } // get due date and add to status, format date differently if reserves (not yet implemented) if ((this.dueDate) && (HomeLocDesc.indexOf("Reserve") >= 0)) { var date = new Date(this.dueDate); itemStatus = '--Due ' + (date.getMonth() + 1) + '/' + date.getDate() + '/' + date.getFullYear() + ', ' + date.getHours() + ':' + date.getMinutes(); } else if ((this.dueDate) && (CurrentLocDesc.indexOf("Reserve") >= 0)) { var date = new Date(this.dueDate); itemStatus = '--Due ' + (date.getMonth() + 1) + '/' + date.getDate() + '/' + date.getFullYear() + ', ' + date.getHours() + ':' + date.getMinutes(); } else if (this.dueDate) { var date = new Date(this.dueDate); itemStatus = '--Due ' + (date.getMonth() + 1) + '/' + date.getDate() + '/' + date.getFullYear(); } //check for local holds if (holdableCopies.indexOf("yes") < 0) { if (ItemTypeDesc.indexOf("local hold only") >= 0) { if (LibraryDesc.indexOf(theProfile) >= 0) { holdableCopies = "yes local"; } else { holdableCopies = "no local"; } } else { holdableCopies = "yes"; } } // build line of item holdings info // the span element will be hidden in css but is there so later we can sort lines by location even though they will begin with call number in display var thisLine = '' + LibraryDesc + '' + callInfo + '' + LibraryDesc + ' ' + HomeLocDesc + '' + ItemTypeDesc + itemNote + itemStatus + ''; // put line of items holding info in appropriate array if (CurrentLocDesc.indexOf("On Order") >= 0) { itemsArray.push(thisLine); } else if (callInfo.indexOf("XX") == 0) {} else if (LibraryDesc.indexOf("Electronic") >= 0) { eresourcesArray.push(thisLine); } else if (HomeLocDesc.indexOf("Web subscription") >= 0) { eresourcesArray.push(thisLine); } else if (HomeLocDesc.indexOf("Internet") >= 0) { eresourcesArray.push(thisLine); } else if (LibraryDesc.indexOf(theProfile) >= 0) { itemsArrayTop.push(thisLine); } else { itemsArray.push(thisLine); } // end json itemInfo loop }); } // end json copyInfo loop }); // sort lines by library itemsArrayTop.sort( function (a, b) { if (a.toLowerCase() < b.toLowerCase()) return -1; if (a.toLowerCase() > b.toLowerCase()) return 1; return 0; }); // sort lines by library itemsArray.sort( function (a, b) { if (a.toLowerCase() < b.toLowerCase()) return -1; if (a.toLowerCase() > b.toLowerCase()) return 1; return 0; }); // if there are eresource items, show 856 display if (eresourcesArray.length != 0) { jQuery('#checklink_' + catKey).remove(); jQuery('h3.ui-accordion-header').not('h3.orders_header').hide(); jQuery('div.detailItems').hide(); jQuery('div#detailAvailableDiv0').css("border", "none"); jQuery('div#detailAvailableDiv0').css("float", "left"); jQuery('div.ELECTRONIC_ACCESS_label').css("color", "green"); jQuery('div.ELECTRONIC_ACCESS_label').css("margin-top", "24px"); jQuery('div.ELECTRONIC_ACCESS_label').css("font-style", "normal"); jQuery('div.ELECTRONIC_ACCESS_label').text("Online access"); jQuery('.856_' + catKey).show(); jQuery('.856_' + catKey).parent().prependTo('#copies_' + catKey); jQuery('#copies_' + catKey + ' div.JLCELECTRONIC_ACCESS').before('

Online access

'); } else { jQuery('.856_' + catKey).parent().hide(); } // if there are copies if ((itemsArrayTop.length != 0) || (itemsArray.length != 0)) { // convert arrays to string output var itemsOutput = itemsArrayTop.join("\n"); itemsOutput += itemsArray.join("\n"); var pageURL = jQuery(location).attr('href'); // if on detail display if (pageURL.indexOf("search/detailnonmodal") > 0) { // if this is a bound to copy just add row to existing copy table if (boundTo != "no") { jQuery('#table_' + boundTo).append(itemsOutput); // otherwise build a normal copy table } else { itemsOutput = '' + itemsOutput + '
Call #LocationMaterial
'; jQuery('#checklink_' + catKey).remove(); jQuery('#copies_' + catKey).append(itemsOutput); } // hide default holdings display jQuery('h3.ui-accordion-header').not('h3.orders_header').hide(); jQuery('div.detailItems').hide(); jQuery('div#detailAvailableDiv0').css("border", "none"); jQuery('div#detailAvailableDiv0').css("float", "left"); // else on search results } else { // if this is a bound to copy just add row to existing copy table if (boundTo != "no") { jQuery('#table_' + boundTo).append(itemsOutput); // otherwise build a normal copy table } else { itemsOutput = '' + itemsOutput + '
Call #LocationMaterial
'; jQuery('#checklink_' + catKey).remove(); jQuery('#copies_' + catKey).append(itemsOutput); } // hide copies after the first one jQuery('#copies_' + catKey + ' tr:nth-child(n+3)').addClass("hideholdings"); //if there are more copies, inset more... link and insert & hide less link var moreCopies = itemsArrayTop.length + itemsArray.length - 1; if (jQuery('#morelink_' + catKey).length) {} else if (moreCopies > 0) { jQuery('#copies_' + catKey).after(''); jQuery('#copies_' + catKey + ' table').before(''); jQuery('#lesslink_' + catKey).hide(); } } } //jQuery('#copies_'+catKey).after('

Holdable: '+holdableCopies+'

'); if (holdableCopies.indexOf("no") >= 0) { jQuery('#holdSpan' + catKey).remove(); jQuery('.detailActions .holdButton').remove(); } // end ajax call }); } function getMarcHoldings(catKey, theProfile) { jQuery.getJSON('http://jlc-web.uaa.alaska.edu:8080/symws/rest/standard/lookupTitleInfo?clientID=DS_CLIENT&titleID=' + catKey + '&includeMarcHoldings=true&marcEntryFilter=full&json=true&callback=?', function (data) { // create list for holdings var holdingsArray = []; // list for holdings at local library or group of libraries (based on profile) var holdingsArrayTop = []; // jump to holdings array returned by json holdingsInfo = data.TitleInfo[0].MarcHoldingsInfo; // loop through copyInfo array returned by json jQuery.each(holdingsInfo, function (i, value) { // get library description var LibraryDesc = getDescription(this.holdingLibraryID, LibraryList); LibraryDesc = cleanupLibraryDesc('Null', LibraryDesc); var thisLine = '
' + LibraryDesc; // get location & holdigns jQuery.each(value.MarcEntryInfo, function () { var thisText = this.text; var thisLabel = this.label; // get location description & deal with weird extra holdings location if (thisLabel == 'Location') { var CurrentLocDesc = thisText.split('--')[0]; var LocExtra = thisText.split('--')[1]; CurrentLocDesc = getDescription(CurrentLocDesc, LocationList); CurrentLocDesc = cleanupLocDesc(CurrentLocDesc); thisLine += ', ' + CurrentLocDesc; if ((LocExtra != ' ') && (LocExtra != '')) { thisLine += ', ' + LocExtra; } // get eresource holdings } else if (thisLabel == 'Electronic resource') { //thisText = thisText.replace(/ Public library users\, click here/g,''); //thisLine +='
'+thisText+'
'; // get textual holdings } else if (thisLabel == 'Textual holdings') { thisLine += '
' + thisText + '
'; // get eresource holdings } else if (thisLabel == 'Holdings') { HoldingsDesc = cleanupHoldingsDesc(thisText); thisLine += '
' + HoldingsDesc + '
'; // get any other holdings } else { thisLine += '
' + thisText + '
'; } }); thisLine += '
'; // put line of holdings info in appropriate array if (LibraryDesc.indexOf(theProfile) >= 0) { holdingsArrayTop.push(thisLine); } else { holdingsArray.push(thisLine); } // sort lines by library holdingsArrayTop.sort( function (a, b) { if (a.toLowerCase() < b.toLowerCase()) return -1; if (a.toLowerCase() > b.toLowerCase()) return 1; return 0; }); // sort lines by library holdingsArray.sort( function (a, b) { if (a.toLowerCase() < b.toLowerCase()) return -1; if (a.toLowerCase() > b.toLowerCase()) return 1; return 0; }); }); // if there are serial holdings if ((holdingsArrayTop.length != 0) || (holdingsArray.length != 0)) { // convert arrays to string output var holdingsOutput = holdingsArrayTop.join("\n"); holdingsOutput += holdingsArray.join("\n"); var pageURL = jQuery(location).attr('href'); // if on detail display if (pageURL.indexOf("search/detailnonmodal") > 0) { // display serail holdings jQuery('#copies_' + catKey).append('

Serial holdings

' + holdingsOutput); jQuery('#checklink_' + catKey).remove(); // hide default holdings display jQuery('h3.ui-accordion-header').not('h3.orders_header').hide(); jQuery('div.detailItems').hide(); jQuery('div#detailAvailableDiv0').css("border", "none"); jQuery('div#detailAvailableDiv0').css("float", "left"); // otherwise on search results } else { // remove Less... link to hide item copies // insert & hide the Less.. link to hide serial holdigns jQuery('#lesslink_' + catKey).remove(); jQuery('#copies_' + catKey).append(''); jQuery('#lesslink_' + catKey).hide(); // insert serial holdings jQuery('#copies_' + catKey).append('

Serial holdings

' + holdingsOutput); jQuery('#checklink_' + catKey).remove(); // move item table below serials and hide item table jQuery('#table_' + catKey).appendTo('#copies_' + catKey); jQuery('#table_' + catKey).addClass("hideholdings"); // insert More... link jQuery('#morelink_' + catKey).remove(); jQuery('#copies_' + catKey).append(''); // Hide additional serial holdings after first jQuery('#copies_' + catKey + ' div.holdings:not(:first)').addClass("hideholdings"); jQuery('#copies_' + catKey + ' div.nest').addClass("hideholdings"); } } // end ajax call }); } function moreCopies(catKey) { // executed when you click on the More Copies link // show the hidden copies // insert a Hide copies link // the style overflow visible part is to fix css problem in ie8 jQuery('#copies_' + catKey + ' div').removeClass("hideholdings"); jQuery('#copies_' + catKey + ' table').removeClass("hideholdings"); jQuery('#copies_' + catKey + ' tr').removeClass("hideholdings"); jQuery('#lesslink_' + catKey).show(); jQuery('#morelink_' + catKey).hide(); jQuery('div.cell_wrapper').attr("style", "overflow:visible/0;"); return false; } function hideCopies(catKey) { // executed when you click on the Hide Copies link // hide the additional copies // insert a More ... link // the style overflow visible part is to fix css problem in ie8 jQuery('#copies_' + catKey + ' tr:nth-child(n+3)').addClass("hideholdings"); jQuery('#morelink_' + catKey).show(); jQuery('#lesslink_' + catKey).hide(); jQuery('div.cell_wrapper').attr("style", "overflow:auto/0;"); return false; } function hideHoldings(catKey) { //executed when you click on the Hide Holdings link // hide all item copies & hide additional serial holdings // insert a More ... link // the style overflow visible part is to fix css problem in ie8 jQuery('#copies_' + catKey + ' table').addClass("hideholdings"); jQuery('#copies_' + catKey + ' div.holdings:not(:first)').addClass("hideholdings"); jQuery('#copies_' + catKey + ' div.nest').addClass("hideholdings"); jQuery('#morelink_' + catKey).show(); jQuery('#lesslink_' + catKey).hide(); jQuery('div.cell_wrapper').attr("style", "overflow:auto/0;"); return false; } function getMarcBiblio() { var pageURL = jQuery(location).attr('href'); var catKey = pageURL.split('SD_ILS:')[1].split('/')[0]; // json call to web services api and loop through results jQuery.getJSON('http://jlc-web.uaa.alaska.edu:8080/symws/rest/standard/lookupTitleInfo?clientID=DS_CLIENT&titleID=' + catKey + '&includeOPACInfo=false&marcEntryFilter=all&json=true&callback=?', function (data) { // jump to biblio info array returned by json bibInfo = data.TitleInfo[0].BibliographicInfo.MarcEntryInfo; holdingsInfo = data.TitleInfo[0].MarcHoldingsInfo; var thisOutput = ''; thisOutput += '
'; thisOutput += '
'; thisOutput += '
'; // loop through copyInfo array returned by json jQuery.each(bibInfo, function (i, value) { //add select fields to output if (this.entryID == '508') { thisOutput += '
' + this.label + ':
'; thisOutput += '
' + this.text + '
'; } else if (this.entryID == '511') { thisOutput += '
' + this.label + ':
'; thisOutput += '
' + this.text + '
'; } else if (this.entryID == '515') { thisOutput += '
' + this.label + ':
'; thisOutput += '
' + this.text + '
'; } else if (this.entryID == '536') { thisOutput += '
' + this.label + ':
'; thisOutput += '
' + this.text + '
'; } else if (this.entryID == '538') { thisOutput += '
' + this.label + ':
'; thisOutput += '
' + this.text + '
'; } else if (this.entryID == '546') { thisOutput += '
' + this.label + ':
'; thisOutput += '
' + this.text + '
'; } else if (this.entryID == '550') { thisOutput += '
' + this.label + ':
'; thisOutput += '
' + this.text + '
'; } else if (this.entryID == '588') { thisOutput += '
Source of Description Note:
'; thisOutput += '
' + this.text + '
'; } else if (this.entryID == '648') { thisOutput += '
' + this.label + ':
'; thisOutput += '
' + this.text + '
'; } else if (this.entryID == '773') { thisOutput += '
' + this.label + ':
'; thisOutput += '
' + this.text + '
'; } else if (this.entryID == '774') { thisOutput += '
' + this.label + ':
'; thisOutput += '
' + this.text + '
'; } else if (this.entryID == '787') { thisOutput += '
' + this.label + ':
'; thisOutput += '
' + this.text + '
'; } }); thisOutput += '
\n'; // insert above eresources if they exist, otherwise place at end if (jQuery('div.documentSummaries div.ELECTRONIC_ACCESS_label').length) { jQuery('div.documentSummaries:nth-last-child(2)').after(thisOutput); } else { jQuery('div.documentSummaries:last').after(thisOutput); } // now get the bibliographic marc holdings getMarcHoldingsBiblio(); }); } function getMarcHoldingsBiblio() { var pageURL = jQuery(location).attr('href'); var catKey = pageURL.split('SD_ILS:')[1].split('/')[0]; // json call to web services api and loop through results jQuery.getJSON('http://jlc-web.uaa.alaska.edu:8080/symws/rest/standard/lookupTitleInfo?clientID=DS_CLIENT&titleID=' + catKey + '&includeMarcHoldings=true&marcEntryFilter=full&json=true&callback=?', function (data) { // jump to biblio info array returned by json bibInfo = data.TitleInfo[0].BibliographicInfo.MarcEntryInfo; holdingsInfo = data.TitleInfo[0].MarcHoldingsInfo; var thisOutput = ''; thisOutput += '
'; thisOutput += '
'; thisOutput += '
'; // loop through copyInfo array returned by json jQuery.each(bibInfo, function (i, value) { //add select fields to output if (this.entryID == '310') { thisOutput += '
' + this.label + ':
'; thisOutput += '
' + this.text + '
'; } else if (this.entryID == '321') { thisOutput += '
' + this.label + ':
'; thisOutput += '
' + this.text + '
'; } else if (this.entryID == '362') { thisOutput += '
' + this.label + ':
'; thisOutput += '
' + this.text + '
'; } else if (this.entryID == '599') { thisOutput += '
' + this.label + ':
'; thisOutput += '
' + this.text + '
'; } else if (this.entryID == '780') { thisOutput += '
' + this.label + ':
'; thisOutput += '
' + this.text + '
'; } else if (this.entryID == '785') { thisOutput += '
' + this.label + ':
'; thisOutput += '
' + this.text + '
'; } }); thisOutput += '
\n'; // insert above eresources if they exist, otherwise place at end if (jQuery('div.documentSummaries div.ELECTRONIC_ACCESS_label').length) { jQuery('div.documentSummaries:nth-last-child(2)').after(thisOutput); } else { jQuery('div.documentSummaries:last').after(thisOutput); } }); } function getMarcRecord(catKey) { jQuery.getJSON('http://137.229.138.65:8080/symws/rest/standard/lookupTitleInfo?clientID=DS_CLIENT&titleID=' + catKey + '&includeOPACInfo=false&marcEntryFilter=all&json=true&callback=?', function (data) { marcInfo = data.TitleInfo[0].BibliographicInfo.MarcEntryInfo; var marcOutput = ''; jQuery.each(marcInfo, function () { marcOutput += this.entryID + ' ' + this.indicators + ' ' + this.text + "\n"; //jQuery.each(marcInfo,function(){marcOutput+= '
'+this.entryID + ' ' + this.indicators + ' ' + this.text + "
\n"; }); //jQuery('#nm_detail_wrapper').append('

MARC

'+marcOutput); alert(marcOutput); }); } function getPolicies() { // json calls to to retrieve location, library and item type policies LocationList = ""; LibraryList = ""; ItemTypeList = ""; jQuery.getJSON('http://jlc-web.uaa.alaska.edu:8080/symws/rest/admin/lookupLocationPolicyList?clientID=DS_CLIENT&json=true&callback=?', function (data) { LocationList = data.policyInfo; }); jQuery.getJSON('http://jlc-web.uaa.alaska.edu:8080/symws/rest/admin/lookupLibraryPolicyList?clientID=DS_CLIENT&json=true&callback=?', function (data) { LibraryList = data.policyInfo; }); jQuery.getJSON('http://jlc-web.uaa.alaska.edu:8080/symws/rest/admin/lookupItemTypePolicyList?clientID=DS_CLIENT&json=true&callback=?', function (data) { ItemTypeList = data.policyInfo; }); } function getDescription(thisID, thisPolicy) { // routine to retrieve descriptive labels from policy var thisDescription = ''; for (var i = 0; i < thisPolicy.length; i++) { if (thisPolicy[i].policyID == thisID) { return thisPolicy[i].policyDescription; break; } } return thisID; } function cleanupHoldingsDesc(thisHoldings) { // replace some annoying labels from Symphony policies with Enterprise friendly ones thisHoldings = thisHoldings.replace(/\/g, 'Jan '); thisHoldings = thisHoldings.replace(/\/g, 'Feb '); thisHoldings = thisHoldings.replace(/\/g, 'Mar '); thisHoldings = thisHoldings.replace(/\/g, 'Apr '); thisHoldings = thisHoldings.replace(/\/g, 'May '); thisHoldings = thisHoldings.replace(/\/g, 'Jun '); thisHoldings = thisHoldings.replace(/\/g, 'Jul '); thisHoldings = thisHoldings.replace(/\/g, 'Aug '); thisHoldings = thisHoldings.replace(/\/g, 'Sep '); thisHoldings = thisHoldings.replace(/\/g, 'Oct '); thisHoldings = thisHoldings.replace(/\/g, 'Nov '); thisHoldings = thisHoldings.replace(/\/g, 'Dec '); thisHoldings = thisHoldings.replace(/\/g, 'Fall '); thisHoldings = thisHoldings.replace(/\/g, 'Spring '); thisHoldings = thisHoldings.replace(/\/g, 'Summer '); thisHoldings = thisHoldings.replace(/\/g, 'Winter '); thisHoldings = thisHoldings.replace(/\/g, ''); thisHoldings = thisHoldings.replace(/\$/g, ''); thisHoldings = thisHoldings.replace(/\:/g, ' '); thisHoldings = thisHoldings.replace(/\,/g, '\
'); return thisHoldings; } function cleanupLocDesc(thisLocation) { // replace some annoying labels from Symphony policies with Enterprise friendly ones thisLocation = thisLocation.replace(/UAA Learning Resources Center - /g, ''); thisLocation = thisLocation.replace(/UAA Learning Resources Center/g, ''); thisLocation = thisLocation.replace(/UAA Alaska Native Studies - /g, ''); thisLocation = thisLocation.replace(/UAA Career Services - /g, ''); thisLocation = thisLocation.replace(/UAA Small Business Development Center - /g, ''); thisLocation = thisLocation.replace(/Alzheimer\'s Resource Agency - /g, ''); thisLocation = thisLocation.replace(/UAS Shadowed Reserves/g, 'On Reserve'); thisLocation = thisLocation.replace(/Reserve Desk/g, 'On Reserve'); thisLocation = thisLocation.replace(/On Reserve at the Circ Desk/g, 'On Reserve'); thisLocation = thisLocation.replace(/On hold for someone/g, 'On hold'); thisLocation = thisLocation.replace(/Fiction material/g, 'Fiction'); thisLocation = thisLocation.replace(/Reference Material/g, 'Reference Collection'); thisLocation = thisLocation.replace(/UAS Shadowed Circulation/g, 'On Reserve'); thisLocation = thisLocation.replace(/Alaska non-circulating Reference material/g, 'Alaskana Reference'); thisLocation = thisLocation.replace(/Government Documents - 2nd Floor/g, 'Government Documents'); thisLocation = thisLocation.replace(/Archives - 3rd Floor/g, 'Archives'); thisLocation = thisLocation.replace(/Non-fiction circulating materials/g, 'Non-Fiction'); thisLocation = thisLocation.replace(/SSB 378/g, 'SSB378 Non-Circulating'); thisLocation = thisLocation.replace(/APL Branch Magazines/g, 'Magazines'); thisLocation = thisLocation.replace(/APL Loussac Magazines/g, 'Magazines Level 3'); return thisLocation; } function cleanupItemTypeDesc(ItemTypeDesc) { // replace some annoying labels from Symphony policies with Enterprise friendly ones ItemTypeDesc = ItemTypeDesc.replace(/Trade Paperback/g, 'Book'); ItemTypeDesc = ItemTypeDesc.replace(/Paperback Book/g, 'Book'); ItemTypeDesc = ItemTypeDesc.replace(/Music or Spoken Word CD Set/g, 'CD Set'); ItemTypeDesc = ItemTypeDesc.replace(/Music or Spoken Word CD/g, 'CD'); ItemTypeDesc = ItemTypeDesc.replace(/APL Magazine \(circulating\)/g, 'Magazine'); ItemTypeDesc = ItemTypeDesc.replace(/APL Magazine Current Issue \(does not circulate\)/g, 'Magazine \(Current Issue\)'); ItemTypeDesc = ItemTypeDesc.replace(/Video Game/g, 'Video Game \(local hold only\)'); return ItemTypeDesc; } function cleanupLibraryDesc(HomeLocDesc, LibraryDesc) { // replace some annoying labels from Symphony policies with Enterprise friendly ones LibraryDesc = LibraryDesc.replace(/ Atwood Resource Center|Z J |Chugiak |\(Girdwood\) |ASL | Public Library/g, ''); LibraryDesc = LibraryDesc.replace(/Gerrish \(Girdwood\)/g, 'Girdwood'); LibraryDesc = LibraryDesc.replace(/Egan Library/g, 'Egan'); LibraryDesc = LibraryDesc.replace(/Mendenhall Valley/g, 'Mendenhall'); LibraryDesc = LibraryDesc.replace(/SEAK Sealaska Heritage Institute/g, 'Sealaska Heritage'); LibraryDesc = LibraryDesc.replace(/UAA Valdez/g, 'Valdez Consortium'); if (HomeLocDesc.indexOf("UAA Learning Resources Center") >= 0) { LibraryDesc = "UAA Learning Resources Center"; } if (HomeLocDesc.indexOf("UAA Alaska Native Studies") >= 0) { LibraryDesc = "UAA Alaska Native Studies"; } if (HomeLocDesc.indexOf("UAA Career Services") >= 0) { LibraryDesc = "UAA Career Services"; } if (HomeLocDesc.indexOf("UAA Small Business Development Center") >= 0) { LibraryDesc = "UAA Small Business Development Center"; } if (HomeLocDesc.indexOf("Alzheimer\'s Resource Agency") >= 0) { LibraryDesc = "Alzheimer\'s Resource Agency"; } return LibraryDesc; } function getProfile() { // parse the profile url and convert to a profile name useful for sorting the holdings var theProfile = jQuery('#searchBoxHomeLink a').attr('href').split('/')[2].toUpperCase(); theProfile = theProfile.replace(/ANCMUSEUM/g, 'Anchorage Museum'); theProfile = theProfile.replace(/ASL/g, 'State Library'); theProfile = theProfile.replace(/SEALASKA/g, 'Sealaska'); theProfile = theProfile.replace(/VALDEZ/g, 'Valdez Consortium'); theProfile = theProfile.replace(/UAAHOMER/g, 'UAA Homer'); theProfile = theProfile.replace(/UAAKENAI/g, 'UAA Kenai'); theProfile = theProfile.replace(/UAAKODIAK/g, 'UAA Kodiak'); theProfile = theProfile.replace(/UAAMATSU/g, 'UAA Mat-Su'); if (theProfile == "UAA") { theProfile = "APU Consortium"; } if (theProfile == "TESTY") { theProfile = "APU Consortium"; //theProfile = "APL"; } return theProfile; } function cleanupResults(thisResult) { // change label of text it to me button jQuery(thisResult).find('.textit').attr('value', 'Text Call #'); // get the profile name var theProfile = getProfile(); // if not one of the university libraries, remove the refworks button if (theProfile.indexOf("APU") >= 0) {} else if (theProfile.indexOf("UAA") >= 0) {} else if (theProfile.indexOf("UAS") >= 0) {} else { jQuery('div[id*="REFWORKS"]').remove();; } // remove GMD from title and associated elements var thisTitle = jQuery(thisResult).find('.displayDetailLink a').text(); thisTitle = thisTitle.replace(/\[(art\ original|microscope\ slides|art\ reproduction|model|chart|motion\ picture|diorama|picture|electronic\ resource|realia|filmstrip|slide|flash\ card|sound\ recording|game|technical\ drawing|graphic|toy|kit|transparency|microform|videorecording|DVD|large\ print|text\ \(large\ print\))\]/g, ''); jQuery(thisResult).find('.displayDetailLink a').text(thisTitle); jQuery(thisResult).find('.displayDetailLink a').attr('title', thisTitle); jQuery(thisResult).find('.no_image_text').text(thisTitle); jQuery(thisResult).find('.no_image_text').attr('title', thisTitle); jQuery(thisResult).find('.thumbnail img').attr('title', thisTitle); // clean up a number of fields of library neologism if (jQuery(thisResult).find('.JLCDSP_PERSONAL_AUTHOR').length) { var theAuthor = jQuery(thisResult).find('.JLCDSP_PERSONAL_AUTHOR').text(); theAuthor = theAuthor.replace(/[\,\.]$/, ' '); jQuery(thisResult).find('.JLCDSP_PERSONAL_AUTHOR').text('by ' + theAuthor); } if (jQuery(thisResult).find('.JLCPUBDATE').length) { var thePubDate = jQuery(thisResult).find('.JLCPUBDATE').text(); thePubDate = thePubDate.replace(/[\[\]\.\:\?\=]/g, ''); thePubDate = thePubDate.replace(/c(\d{4})/g, '$1'); thePubDate = thePubDate.replace(/p(\d{4})/g, '$1'); thePubDate = thePubDate.replace(/\s{2,}/g, ' '); jQuery(thisResult).find('.JLCPUBDATE').text(thePubDate); } if (jQuery(thisResult).find('.EDITION').length) { var theEdition = jQuery(thisResult).find('.EDITION').text(); theEdition = theEdition.replace(/[\[\]]/g, ''); theEdition = theEdition.replace(/\s{2,}/g, ' '); jQuery(thisResult).find('.JLCPUBDATE').append(', ' + theEdition); jQuery(thisResult).find('.EDITION').text(''); } if (jQuery(thisResult).find('.JLCSERIES').length) { var theSeries = jQuery(thisResult).find('.JLCSERIES').text(); theSeries = theSeries.replace(/\;/g, '-'); theSeries = theSeries.replace(/bk\./g, 'book'); jQuery(thisResult).find('.JLCPUBDATE').append(', ' + theSeries); jQuery(thisResult).find('.JLCSERIES').text(''); } if (jQuery(thisResult).find('.SERIES_TITLE').length) { var theSeries = jQuery(thisResult).find('.SERIES_TITLE').text(); theSeries = theSeries.replace(/\;/g, '-'); theSeries = theSeries.replace(/bk\./g, 'book'); jQuery(thisResult).find('.JLCPUBDATE').append(', ' + theSeries); jQuery(thisResult).find('.SERIES_TITLE').text(''); } if (jQuery(thisResult).find('.BIBSUMMARY').length) { jQuery(thisResult).find('.BIBSUMMARY').append('...'); } // display label of format icon next to it if (jQuery(thisResult).find('.formatType').length) { var formatLabel = jQuery(thisResult).find('.formatType').attr('title'); var theFormat = jQuery(thisResult).find('.formatType').append(' ' + formatLabel); jQuery(thisResult).find('.formatType').text(theFormat); } // display GMD next to format icon & label if not same as label if (jQuery(thisResult).find('.JLCDSP_TITLE245H').length) { var the245h = jQuery(thisResult).find('.JLCDSP_TITLE245H').text(); the245h = the245h.replace(/[\[\]\.\:\=]/g, ''); the245h = the245h.replace(/\s{2,}/g, ' '); the245h = the245h.replace(/microform/g, ' '); the245h = the245h.replace(/DVD/g, ' '); the245h = the245h.replace(/electronic resource/g, ' '); the245h = the245h.replace(/text \(large print\) /g, 'large print'); jQuery(thisResult).find('.JLCDSP_TITLE245H').text(the245h); } } function cleanupDetail(thisResult) { var thisTitle = jQuery('.INITIAL_TITLE_SRCH').text(); thisTitle = thisTitle.replace(/\[(art\ original|microscope\ slides|art\ reproduction|model|chart|motion\ picture|diorama|picture|electronic\ resource|realia|filmstrip|slide|flash\ card|sound\ recording|game|technical\ drawing|graphic|toy|kit|transparency|microform|videorecording|DVD|large\ print)\]/g, ''); jQuery('.INITIAL_TITLE_SRCH').text(thisTitle); jQuery('.no_image_text').text(thisTitle); jQuery('.detail_cover_art_div img').attr('title', thisTitle); document.title = thisTitle; // get the profile name var theProfile = getProfile(); if (theProfile.indexOf("APU") >= 0) {} else if (theProfile.indexOf("UAA") >= 0) {} else if (theProfile.indexOf("UAS") >= 0) {} else { jQuery('div[id*="REFWORKS"]').remove();; } // change label of text it to me button jQuery('.textItToMeButton .button').attr('value', 'Text Call #'); // move hold button to top of stack to match search results jQuery('.textItToMeButton').insertAfter('.holdButton'); // remove part from series hyperlink and add field delimiter jQuery('div.SERIES a').each(function () { var seriesURL = jQuery(this).attr('href'); if (seriesURL.indexOf("\+\%3B") >= 0) { var seriesTitle = jQuery(this).text().split(';').reverse().pop(); var seriesPart = jQuery(this).text().split(';').pop(); jQuery(this).text(seriesTitle); jQuery(this).after(' ;' + seriesPart); if (seriesURL.indexOf("\&lm\=") >= 0) { var seriesLimiter = seriesURL.split('&lm=').pop(); seriesURL = seriesURL.split('+%3B').reverse().pop(); seriesURL = seriesURL + '&lm=' + seriesLimiter; } else { seriesURL = seriesURL.split('+%3B').reverse().pop(); } } jQuery(this).attr('href', seriesURL + '&rt=SERIES|||Series|||false'); }); // add field delimiter to author hyperlinks jQuery('div.PERSONAL_AUTHOR a, div.CORPORATE_AUTHOR a, div.ADDED_CORPORATE_AUTHOR a').each(function () { var authorURL = jQuery(this).attr('href'); jQuery(this).attr('href', authorURL + '&rt=AUTHOR|||Author|||false'); }); // add field delimiter to subject hyperlinks & remove OCLCfast gibberish jQuery('div.SUBJECT_TERM a, div.PERSONAL_SUBJECT a, div.GEOGRAPHIC_TERM a, div.GENRE_TERM a').each(function () { var subjectURL = jQuery(this).attr('href'); var subjectText = jQuery(this).text(); subjectText = subjectText.replace(/\(OCoLC\)fst\d+/g, ''); subjectURL = subjectURL.replace(/\+\%28OCoLC\%29fst\d+/g, ''); jQuery(this).text(subjectText); jQuery(this).attr('href', subjectURL + '&rt=SUBJECT|||SUBJECT|||false'); }); } function cleanup856() { // clean up 856 links based on logic for our consortium // includes changing labels and inserting appropriate proxy prefixes for authentication var pageURL = jQuery(location).attr('href'); var labelAPL = "Subscription access for APL patrons"; var labelASL = "Subscription access for ASL state agency employees"; var labelOpen = "Open access website"; var labelListenAlaska = "Download from Listen Alaska"; var labelJPL = "Subscription access for JPL patrons"; var labelUAA = "Subscription access for UAA/APU faculty, students, and on-campus users"; var labelUAS = "Subscription access for UAS faculty, students, and on-campus users"; var proxyUAA = "http://proxy.consortiumlibrary.org/login?url="; var prevURL = ""; jQuery('div.JLCELECTRONIC_ACCESS a, div.ELECTRONIC_ACCESS_label ~ a').each(function () { var theURL = jQuery(this).attr('href'); if (theURL.indexOf("imdb\.com") >= 0) { jQuery(this).show(); } else if (theURL.indexOf("listenalaska\.lib\.overdrive\.com") >= 0) { jQuery(this).text(labelListenAlaska); } else if (theURL.indexOf("ebrary\.com\/lib\/akstatelibrary") >= 0) { jQuery(this).text(labelASL); } else if (theURL.indexOf("ebrary\.com\/lib\/juneau") >= 0) { jQuery(this).text(labelJPL); } else if (theURL.indexOf("junezproxy\.juneau\.lib\.ak\.us") >= 0) { jQuery(this).text(labelJPL); } else if (theURL.indexOf("ebrary\.com\/lib\/uasoutheast") >= 0) { jQuery(this).text(labelUAS); } else if (theURL.indexOf("137\.229\.218\.70") >= 0) { jQuery(this).text(labelUAS); } else if (theURL.indexOf("egandb\.uas\.alaska\.edu") >= 0) { jQuery(this).text(labelUAS); } else if (theURL.indexOf("id\=uase") >= 0) { jQuery(this).text(labelUAS); } else if (theURL.indexOf("id\=UASE") >= 0) { jQuery(this).text(labelUAS); } else if (theURL.indexOf("ebrary\.com\/lib\/alaskauniv") >= 0) { jQuery(this).text(labelUAA); } else if (theURL.indexOf("anch19713") >= 0) { jQuery(this).text(labelUAA); var strNewURL = proxyUAA + jQuery(this).attr('href'); jQuery(this).attr('href', strNewURL); } else if (theURL.indexOf("morganclaypool\.com") >= 0) { jQuery(this).text(labelUAA); var strNewURL = proxyUAA + jQuery(this).attr('href'); jQuery(this).attr('href', strNewURL); } else if (theURL.indexOf("ovidsp\.ovid\.com") >= 0) { jQuery(this).text(labelUAA); var strNewURL = proxyUAA + jQuery(this).attr('href'); jQuery(this).attr('href', strNewURL); } else if (theURL.indexOf("content\.apa\.org") >= 0) { jQuery(this).text(labelUAA); var strNewURL = proxyUAA + jQuery(this).attr('href'); jQuery(this).attr('href', strNewURL); } else if (theURL.indexOf("psycnet\.apa\.org") >= 0) { jQuery(this).text(labelUAA); var strNewURL = proxyUAA + jQuery(this).attr('href'); jQuery(this).attr('href', strNewURL); } else if (theURL.indexOf("R2Library\.com") >= 0) { jQuery(this).text(labelUAA); var strNewURL = proxyUAA + jQuery(this).attr('href'); jQuery(this).attr('href', strNewURL); } else if (theURL.indexOf("r2ibrary\.com") >= 0) { jQuery(this).text(labelUAA); var strNewURL = proxyUAA + jQuery(this).attr('href'); jQuery(this).attr('href', strNewURL); } else if (theURL.indexOf("sage-ereference\.com") >= 0) { jQuery(this).text(labelUAA); var strNewURL = proxyUAA + jQuery(this).attr('href'); jQuery(this).attr('href', strNewURL); } else if (theURL.indexOf("search\.ebscohost\.com") >= 0) { jQuery(this).text(labelUAA); var strNewURL = proxyUAA + jQuery(this).attr('href'); jQuery(this).attr('href', strNewURL); } else if (theURL.indexOf("statref\.com") >= 0) { jQuery(this).text(labelUAA); var strNewURL = proxyUAA + jQuery(this).attr('href'); jQuery(this).attr('href', strNewURL); } else if (theURL.indexOf("atoz\.ebsco\.com") >= 0) {} else if (theURL.indexOf("search/results") >= 0) {} else if (pageURL.indexOf("search/detailnonmodal") < 0) { //jQuery(this).text(labelOpen); } // if link label is just PURL display url as label instead if (jQuery(this).text() == 'PURL') { jQuery(this).text(theURL); } // dedup identical links if (theURL == prevURL) { jQuery(this).remove(); } else { prevURL = jQuery(this).attr('href'); } }); // label springer links that are not UAS as UAA jQuery('.displayElementWrapper .JLCELECTRONIC_ACCESS:contains("SpringerLink") a:not(.displayElementWrapper a[href*="137\.229\.218\.70"],.displayDetailLink a)').each(function () { jQuery(this).text(labelUAA); var strNewURL = proxyUAA + jQuery(this).attr('href'); jQuery(this).attr('href', strNewURL); }); jQuery('.displayElementLabel ELECTRONIC_ACCESS_label:contains("SpringerLink") a:not(.displayElementWrapper a[href*="137\.229\.218\.70"],.displayDetailLink a)').each(function () { jQuery(this).text(labelUAA); var strNewURL = proxyUAA + jQuery(this).attr('href'); jQuery(this).attr('href', strNewURL); }); } function loadScriptLTFL() { // load mystery scripts from LTFL that inserts reviews var thescript = document.createElement('script'); thescript.setAttribute('type', 'text/javascript'); thescript.setAttribute('src', 'http://ltfl.librarything.com/forlibraries/widget.js?id=1927-396652473'); document.getElementsByTagName('head')[0].appendChild(thescript); //wait 3 secounds and cleanup Library Thing format setTimeout("cleanupLTFL();", 3000); } function cleanupLTFL() { // loop through reviews jQuery('span.ltfl_reviews').each(function () { jQuery(this).find('span:first').remove(); // change label for first review var theLabel = jQuery(this).find('a:first').text(); theLabel = theLabel.replace(/No\ reviews/g, 'Add 1st review'); jQuery(this).find('a:first').attr('text', theLabel); // change label if reviews if (jQuery(this).find('.ltfl_review_text').text().length) { var theLabel = jQuery(this).find('.ltfl_review_text').text(); theLabel = theLabel.replace(/\;/g, ''); theLabel = theLabel.replace(/\(/g, ''); theLabel = theLabel.replace(/\)/g, ''); jQuery(this).find('a:first').text(theLabel); } jQuery(this).find('a:first').append('
'); jQuery(this).find('.ltfl_review_text img').appendTo(jQuery(this).find('a:first')); jQuery(this).find('.ltfl_review_text').remove(); jQuery(this).show(); }); } function kidscatalog(pageURL) { // hide the breadcrump jQuery('#taxonomyContainer').remove(); // if library limit is set, i.e. a school has been selected if (pageURL.indexOf("&lm=") >= 0) { var theSchool = jQuery(location).attr('href').split('&lm=')[1].split('&')[0]; // add library limit to home link jQuery('#searchBoxHomeLink a').each(function () { var theURL = jQuery(this).attr('href'); theURL += '&lm=' + theSchool; jQuery(this).attr('href', theURL); }); //add library limit to rooms links jQuery('#school_homepage a').each(function () { var theURL = jQuery(this).attr('href'); theURL += '&lm=' + theSchool; jQuery(this).attr('href', theURL); }); // change label if school selected jQuery('.homepage_title').each(function () { var SchoolLabel = "Find Books at My School Library"; if (theSchool == 'APL') { SchoolLabel = 'Find Books at Anchorage Public Library'; } else if (theSchool == 'APL-GR') { SchoolLabel = 'Find Books at Girdwood Library'; } else if (theSchool == 'APL-CE') { SchoolLabel = 'Find Books at Eagle River Library'; } else if (theSchool == 'APL-LL') { SchoolLabel = 'Find Books at Loussac Library'; } else if (theSchool == 'APL-MV') { SchoolLabel = 'Find Books at Mountain View Library'; } else if (theSchool == 'APL-MD') { SchoolLabel = 'Find Books at Muldoon Library'; } jQuery(this).text(SchoolLabel); }); } }