1/** 2 * jQuery.browser.mobile (http://detectmobilebrowser.com/) 3 * 4 * jQuery.browser.mobile will be true if the browser is a mobile device 5 * 6 **/ 7(function(a){(jQuery.browser=jQuery.browser||{}).mobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))})(navigator.userAgent||navigator.vendor||window.opera); 8 9 10var searchTimeout; 11 12function loadAjaxSearch() { 13 clearTimeout(searchTimeout); 14 search_v = $('#s').val(); 15 $('#search-container .slides_container').clearQueue(); 16 17 searchTimeout = setTimeout(function() { 18 search_v = search_v.replace(" ","+"); 19 $.ajax({ 20 url: '/?s=' + search_v + '&ajax', 21 cache: false, 22 dataType: "html", 23 success: function(data){ 24 $('#search-container .slides_container').html((data)); 25 } 26 }); 27 },'300'); 28 29 30 31 32 33 /* $(function(){ 34 $("#search-container").slides( { 35 play: 10000, 36 effect: 'slide', 37 generatePagination: false, 38 next: 'search-next', 39 prev: 'search-prev', 40 generateNextPrev: false 41 }); 42 }); 43 44 */ 45 46 47 48 49} 50 51 52$.event.special.tap.emitTapOnTaphold = false; 53 54function loadArbMap() { 55 56 57 58 59} 60 61var theCurrent; 62function turnSlider(toggle, id) { 63 if(theCurrent) { 64 theCurrent = 0; 65 } else { 66 67 68 } 69 70 var theID = '#' + id; 71 72 if(toggle) { 73 $(theID).fadeToggle(300); 74 75} 76else { 77 $('#dropdown').fadeToggle(300); 78 79} 80 $('#s').keypress(loadAjaxSearch); 81} 82 83 84 $(function(){ 85 $("#slickslides").slick( { 86 autoplay: true, 87 autoplaySpeed: 4000, 88 speed: 500, 89 fade: true, 90 91 nextArrow: $('#nextArrow'), 92 prevArrow: $('#prevArrow'), 93 94 95 96 }); 97 98 $(".slickpromos").slick( { 99 autoplay: true, 100 autoplaySpeed: 4000, 101 fade: true, 102 speed: 500, 103 104 nextArrow: $('#nextArrow2'), 105 prevArrow: $('#prevArrow2'), 106 107 108 109 }); 110 111 }); 112 113 114var currentDrop = ''; 115function toggleDrop(toggle) { 116var drop; 117 loadDrop = '#dropped-' + toggle; 118 nextDrop = $(loadDrop).html(); 119 $('.dropdown-container').html(nextDrop); 120 121 122 123 124 if($('#dropdown-main').hasClass('dropped') && (currentDrop == toggle)) { 125 126 $('#dropdown-main').removeClass('dropped'); 127 $('#dropdown-main').fadeToggle(300); 128 129 } else if($('#dropdown-main').hasClass('dropped') && (currentDrop != toggle)) { 130 131 if(toggle=="search") { 132 133 $(document).change( function() { 134 loadAjaxSearch(); 135 }); 136 } 137 138 $('#dropdown-main').addClass('dropped'); 139 140 } 141 else { 142 143 $('#dropdown-main').fadeToggle(300, function() { 144 145 if(toggle=="search") { 146 147 $(document).on("keyup", "#s", function() { 148 loadAjaxSearch(); 149 }); 150 } 151 152 }); 153 $('#dropdown-main').addClass('dropped'); 154 155 } 156 157 if(toggle=="hours") { 158 159 } 160 161 currentDrop = toggle; 162 163} 164 165function showEvent(id) { 166if (jQuery.browser.mobile) { 167 theID = '.' + id; 168 eventLoader = $(theID).html(); 169 $('#mobile-overlay > .event-popup').html(eventLoader); 170 $('#mobile-overlay').fadeToggle(200); 171 172} else { 173 174 $('.event-toggled').fadeOut(200); 175 $('.event-toggled').removeClass('event-toggled'); 176 theID = '.' + id; 177 $(theID).addClass('event-toggled'); 178 $(theID).fadeIn(200); 179} 180 181} 182 183function hideEvent(id) { 184 if (jQuery.browser.mobile) { 185 $('#mobile-overlay').fadeToggle(200); 186 } else { 187 theID = '.' + id; 188 $(theID).fadeOut(200); 189 } 190} 191 192function toggleTax(tax, color) { 193 194 totalItems = $('#theCalTax > li').length; 195 totalToggledItems = $('#theCalTax > ul > li.toggled').length; 196 theToggle = "." + tax + "-toggle"; 197 theSelect = "." + tax; 198 199 200 201 if (totalToggledItems == 0) { 202 $('.cal-tax').addClass('toggled'); 203 $('.event').toggle(); 204 $(theToggle).removeClass('toggled'); 205 $(theSelect).toggle(); 206 207 } else { 208 if ($(theToggle).hasClass('toggled')) { 209 $(theToggle).removeClass('toggled'); 210 $(theSelect).toggle(); 211 212 } else { 213 $(theToggle).addClass('toggled'); 214 $(theSelect).toggle(); 215 216 217 } 218 } 219 220 221 222} 223 224var currentYear = 'All'; 225function magazineToggle(year,this_var) { 226 $('.this_year').removeClass('this_year'); 227 $(this_var).addClass('this_year'); 228 if(year == 'All') { 229 $('.toggled').fadeToggle( function() { 230 $('.toggled').removeClass('toggled'); 231 $('.mag-item').fadeToggle( function() { 232 $('.mag-item').stop(true); 233 }); 234 $('.mag-item').addClass('toggled'); 235 236 }); 237 238 239 } else if (currentYear == year) { 240 241 242 243 244 } 245 else { 246 $('.toggled').fadeToggle( function() { 247 $('.toggled').removeClass('toggled'); 248 $('.' + year).addClass('toggled'); 249 $('.toggled').fadeToggle( function() { 250 $('.toggled').stop(true); 251 }); 252 253 254 }); 255} 256 257} 258 259function magazineList(type) { 260 if ($('#mag-container').hasClass(type)) { 261 262 263 } else { 264 $('#mag-container').removeClass(); 265 $('#mag-container').addClass(type); 266 267 } 268 269} 270 271$( window ).load(function() { 272 if ( $('#site-header-logo').is(':visible')) { 273 sidebarHeight = $('#content').height(); 274 $('#main-content-blog').height((sidebarHeight - 57)); 275} 276 277}); 278 279 280
281$('.mag-item').mouseenter(function(){ 282 if ($('#mag-container').hasClass('grid')) { 283 $(this).children('.mag-info').fadeIn(200); 284 } 285}); 286$('.mag-item').mouseleave(function(){ 287 if ($('#mag-container').hasClass('grid')) { 288 $(this).children('.mag-info').fadeOut(200); 289 } 290 291}); 292 293 294 295function embedMag (embed) { 296 $("#mag-overlay").toggle(); 297 $("#mag-embed-container").html(embed); 298 299} 300 301function magClose() { 302 $("#mag-overlay").toggle(); 303 304} 305 306var toggleAmount = 0; 307 308$(".mobile-nav-children-toggle").click( function() { 309 $( this ).toggleClass('dropped'); 310 var toBeDropped = $( this ).parent(); 311 var ulToBeDropped = toBeDropped.children('ul'); 312 ulToBeDropped.slideToggle(200); 313 314}); 315 316 317 318 319 320 321 322$(document).ready(function(){ 323 324 325 $("ul.collections-list > li").on("mouseenter", function() { 326 $( this ).children('div').toggleClass('activeCol'); 327 328 329 }); 330 $("ul.collections-list > li").on("mouseleave", function() { 331 $( this ).children('div').toggleClass('activeCol'); 332 333 334 }); 335 336 337 338 (function($) { 339 $(document).ready(function() { 340 $.slidebars(); 341 //$('.slide-content').css('width', screen.width); 342 $('.flexslider').flexslider(); 343 }); 344 }) (jQuery); 345 346 347 348 349 350 351 352 $(window).load(function() { 353 console.log('test'); 354 355 }); 356 357 358 359 $('a[href*=#]:not([href=#])').click(function() { 360 if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { 361 var target = $(this.hash); 362 target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); 363 if (target.length) { 364 $('html,body').animate({ 365 scrollTop: target.offset().top 366 }, 1000); 367 return false; 368 } 369 } 370 }); 371 372 373 374 $('#coverflow').coverflow({ 375 angle : 0, 376 select : function(event,ui){ 377 changePublication(event,ui); 378 }, 379 overlap : .5 380 }); 381 382 $('.coverNext').on('click', function() { 383 $('#coverflow' ).coverflow( 'next' ); 384 385 386 }); 387 388 389 $('.coverPrev').on('click', function() { 390 $('#coverflow' ).coverflow( 'prev' ); 391 392 393 }); 394 395 $('#archiveSearch').on('submit', function(event) { 396 if($('#keyword').is(':checked')) { 397 event.preventDefault(); 398 theSText = $('#search').val(); 399 theSText = theSText.replace("+"," "); 400 window.open('http://www.biodiversitylibrary.org/search?searchTerm=' + theSText + '+arboretum#/sections'); 401 } else if ($('#search').val() == "") { 402 event.preventDefault(); 403 404 } 405 }); 406 407 $('#archiveSimple').on('submit', function(event) { 408 if($('#simplekeyword').is(':checked')) { 409 event.preventDefault(); 410 theSText = $('#simpsearch').val(); 411 theSText = theSText.replace("+"," "); 412 window.open('http://www.biodiversitylibrary.org/search?searchTerm=' + theSText + '+arboretum#/sections'); 413 } else if ($('#simpsearch').val() == "") { 414 event.preventDefault(); 415 416 } 417 }); 418 }); 419 420 421 function changePublication(event,ui) { 422 $('.publication-info').html($(ui.active[0]).find('.pub-data').html()); 423 } 424 425 426 //Fix for COntact Forms 7) 427 428 function goTo(url) 429 { 430 var a = document.createElement("a"); 431 if (a.click) 432 { 433 // HTML5 browsers and IE support click() on <a>, early FF does not. 434 a.setAttribute("href", url); 435 a.style.display = "none"; 436 document.body.appendChild(a); 437 a.click(); 438 } else { 439 // Early FF can, however, use this usual method 440 // where IE cannot with secure links. 441 } 442 } 443 444 445 function loadArchive(url) { 446 var ua = window.navigator.userAgent; 447 var msie = ua.indexOf("MSIE "); 448 url = url.replace('1up', '2up'); 449 // event.preventDefault(); 450 if(msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)){ 451 $("#issue-frame").remove(); 452 $("#issue-overlay").fadeToggle(); 453 $("#issue-embed-container").append('<iframe id="issue-frame" src="https://archive.org/embed/' + url + '"></iframe>'); 454 } else { 455 $("#issue-frame").attr('src', 'https://archive.org/embed/' + url); 456 $("#issue-overlay").fadeToggle(); 457 458 459 } 460 461 } 462 463 464 function issueClose() { 465 $("#issue-overlay").fadeToggle(); 466 467 } 468 469 function coverflowClick(param,url) { 470 471 if ($(param).parent().hasClass('ui-state-active')) { 472 window.location = url; 473 } else { 474 475 } 476 477 } 478 479 480 var currentYear = false;
481 482 function selectYears(val) { 483 if (currentYear) { 484 $('.toggled').fadeToggle( function() { 485 $('.toggled').removeClass('toggled'); 486 currentYear = val.value; 487 $('.year-' + val.value).fadeToggle( function() { 488 $('.year-' + val.value).stop(true); 489 }); 490 $('.year-' + val.value).addClass('toggled'); 491 492 }); 493 494 495 496 497 498 } else { 499 $('.issue-item').fadeToggle(400); 500 $('.year-' + val.value).fadeToggle(); 501 currentYear = val.value; 502 $('.year-' + val.value).addClass('toggled'); 503 504 } 505} 506 507 function toggleArchive(val) { 508 if (val == 'search' && $('.search').hasClass(('atoggled')) == false) { 509 $('.archiveSelector > div').removeClass('atoggled'); 510 $('.search').addClass('atoggled'); 511 512 $('.archive-search').fadeToggle(); 513 $('#coverflow').fadeToggle(); 514 $('h1').fadeToggle(); 515 $('.publication-info').fadeToggle(); 516 } else if (val == 'browse' && $('.browse').hasClass(('atoggled')) == false) { 517 $('.archiveSelector > div').removeClass('atoggled'); 518 $('.browse').addClass('atoggled'); 519 520 $('.archive-search').fadeToggle(); 521 $('#coverflow').fadeToggle(); 522 $('h1').fadeToggle(); 523 $('.publication-info').fadeToggle(); 524 } 525 526 527 }
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.