1"use strict"; 2 3function openForm(id) { 4 console.log(id); 5 $('#' + id).show(); 6} 7 8function openNav() { 9 $('#myNav').fadeIn(300); // $('.nav-headline-and-links').fadeIn(1500); 10 11 $('#overlay_menu').fadeIn(1500); 12 $('.nav-fade-1').fadeIn(1100); 13 $('.nav-fade-2').fadeIn(1200); 14 $('.nav-fade-3').fadeIn(1300); 15 $('.nav-fade-4').fadeIn(1400); 16 $('.nav-fade-5').fadeIn(1500); 17 $('.nav-fade-6').fadeIn(1600); 18 $('.nav-fade-7').fadeIn(1700); 19 $('.nav-fade-8').fadeIn(1800); 20 $('.nav-fade-9').fadeIn(1900); 21 $('.nav-fade-10').fadeIn(2000); 22 $('.nav-fade-11').fadeIn(2100); 23 $('.nav-fade-12').fadeIn(2200); 24 var targetElement = document.querySelector("#myNav"); // 2. ...in some event handler after showing the target element...disable body scroll 25 26 bodyScrollLock.disableBodyScroll(targetElement); 27} 28 29function closeNav() { 30 $('#myNav').fadeOut(100); 31 $('#overlay_menu').hide(); 32 $('.nav-fade-1').hide(); 33 $('.nav-fade-2').hide(); 34 $('.nav-fade-3').hide(); 35 $('.nav-fade-4').hide(); 36 $('.nav-fade-5').hide(); 37 $('.nav-fade-6').hide(); 38 $('.nav-fade-7').hide(); 39 $('.nav-fade-8').hide(); 40 $('.nav-fade-9').hide(); 41 $('.nav-fade-10').hide(); 42 $('.nav-fade-11').hide(); 43 $('.nav-fade-12').hide(); 44 var targetElement = document.querySelector("#myNav"); // 3. ...in some event handler after hiding the target element... 45 46 bodyScrollLock.enableBodyScroll(targetElement); 47} //top nav bar $animation 48//checking to find height of hamburger and then building bar from that height 49 50 51var fadeInPoint = 400; // console.log(viewportHeight); 52 53var $window = $(window); 54 55function check_if_in_view() { 56 var window_height = $window.height(); 57 var window_top_position = $window.scrollTop(); 58 var window_bottom_position = window_top_position + window_height; 59 var $hamburger = $('#hamburger'); 60 var hamburger_height = $hamburger.outerHeight(); 61 var hamburger_width = $hamburger.outerWidth(); // var element_top_position = $element.offset().top; 62 // var element_bottom_position = (element_top_position + element_height); 63 //check to see if this current container is within viewport 64 65 if (fadeInPoint >= window_top_position) { 66 // $('#fixed-top-nav-fade').css('height', 0); 67 $('#fixed-top-nav-fade').css('height', hamburger_height); 68 $('#fixed-top-nav-fade').fadeOut(500); 69 $('.header-c-logo').css('max-height', hamburger_height); 70 $('.hamburger').css('background-color', 'rgba(16, 17, 20, 0.75)'); 71 } else { 72 $('#fixed-top-nav-fade').css('height', hamburger_height); 73 $('.hamburger').css('background-color', 'transparent'); 74 $('#fixed-top-nav-fade').fadeIn(500); 75 $('.header-c-logo').css('max-height', hamburger_height); 76 } 77} 78 79$window.on('scroll resize', check_if_in_view); 80$window.trigger('scroll'); 81 82 83AOS.init({ 84 startEvent: 'load' 85}); 86$(function () { 87 88 89 90 91 92 var mare_information_form = $('.mare-info-form'); 93 94 if (mare_information_form != "") { 95 $('.mare-info-form').hide(); 96 97 } 98 99 //add .col-12 .col-sm-6 .col-md-4 to every element under the .checkbox class 100 $(".checkbox").children().addClass("col-12 col-sm-6 col-md-4"); //using to-title-case code to change every element with the class name toTitleCase text to title case 101 102 $(".toTitleCase").each(function () { 103 $(this).text($(this).text().toLowerCase().toTitleCase()); 104 $(this).text($(this).text().replace("Iiii", "IIII")); 105 $(this).text($(this).text().replace("Iii", "III")); 106 $(this).text($(this).text().replace("Ii", "II")); 107 }); 108 $('#overlay_menu').hide(); 109 $('.nav-fade-1').hide(); 110 $('.nav-fade-2').hide(); 111 $('.nav-fade-3').hide(); 112 $('.nav-fade-4').hide(); 113 $('.nav-fade-5').hide(); 114 $('.nav-fade-6').hide(); 115 $('.nav-fade-7').hide(); 116 $('.nav-fade-8').hide(); 117 $('.nav-fade-9').hide(); 118 $('.nav-fade-10').hide(); 119 $('.nav-fade-11').hide(); 120 $('.nav-fade-12').hide(); // $('.nav-headline-and-links').hide(); 121 //trigger a click on the tablepress dropdown so that a table is showing when the page loads 122 123 124 125 126 //stop modal video on exit 127 128 $("#myModal").on('hidden.bs.modal', function (e) { 129 $("#myModal iframe").attr("src", $("#myModal iframe").attr("src")); 130 }); //css scroll animation trigger 131 132 var $animation_elements = $('.animation-element'); 133 var $animation_svg = $('#twin-spires'); 134 var $window = $(window); 135 136 function check_if_in_view() { 137 var window_height = $window.height(); 138 var window_top_position = $window.scrollTop(); 139 var window_bottom_position = window_top_position + window_height; 140 $.each($animation_elements, function () { 141 var $element = $(this); 142 var element_height = $element.outerHeight(); 143 var element_top_position = $element.offset().top; 144 var element_bottom_position = element_top_position + element_height; //check to see if this current container is within viewport 145 146 if (element_bottom_position >= window_top_position && element_top_position <= window_bottom_position) { 147 $element.addClass('in-view'); 148 } else { 149 $element.removeClass('in-view'); 150 } 151 }); 152 } 153 154 $window.on('scroll resize', check_if_in_view); 155 $window.trigger('scroll'); 156 $('.re-animate').click(function () { 157 setTimeout(function () { 158 $('.animation-element').removeClass("in-view"); 159 $window.trigger('scroll'); 160 }, 200); 161 }); 162 163 //sorting for the hall of fame archive 164 165 var sortByName = $('#sort-by-name'); 166 var sortByBirthYear = $('#sort-by-birth-year'); 167 168 if (sortByName.length > 0) { 169 $('#sort-by-birth-year-button').click(function () { 170 sortByName.hide(); 171 sortByBirthYear.fadeIn(500); 172 }); 173 $('#sort-by-name-button').click(function () { 174 sortByBirthYear.hide(); 175 sortByName.fadeIn(500); 176 }); 177 sortByBirthYear.hide(); 178 } 179 180 //show a new field on the mare information window if someone selects the in-foal option on the select dropdown; 181 182 183 if ($('#submit-mare-form').length > 0) { 184 document.getElementById("submit-mare-form").addEventListener("change", function () {
185 $('#in-foal-description').slideUp(); 186 var statusSelect = $("#submit-mare-form option:selected").text(); 187 188 if (statusSelect === 'In-Foal') { 189 $('#in-foal-description').slideDown(); 190 } 191 }); 192 } 193}); 194 195var cljs = function () { 196 197 198 199 // makejquery 'contains' selector case insensitive 200 $.expr[":"].contains = $.expr.createPseudo(function(arg) { 201 return function( elem ) { 202 return $(elem).text().toUpperCase().indexOf(arg.toUpperCase()) >= 0; 203 }; 204 }); 205 206 207 function parseJSON(value) { 208 209 210 var tableData = value.replace(/'/g, '"'); 211 tableData = JSON.parse(tableData); 212 213 return tableData; 214 } 215 216 217 function attachPedigreeURLS(json, enhancedCatalogue) { 218 if (enhancedCatalogue && enhancedCatalogue === 1){ 219 var urlEnding = "" 220 }else{ 221 var urlEnding = ".pdf" 222 } 223 224 var pedigreeUrl = json.pedigreeURL; 225 var hipIndex = $('.table-ID-' + json.shortcodeID + ' th:contains("HIP")').index(); 226 227 hipIndex++; 228 229 $('.table-ID-' + json.shortcodeID + ' tr td:nth-child(' + hipIndex + ')').each(function (i, obj) { 230 231 var _this = this; 232 233 234 if ($(this).html() != "HIP" && $(this).html() != "Hip" && $(this).html() != "hip") { 235 var hipNum = $(this).html(); 236 hipNum = parseInt(hipNum, 10); 237 238 239 $(_this).parent().click(function () {
240 window.open(pedigreeUrl + hipNum + urlEnding ); 241 }); 242 243 } 244 245 }); 246 247 } 248 249 250 251 function selectTable(value) { 252 253 254 var tableData = parseJSON(value) 255 256 257 if (tableData.consignmentType === 'past-results') { 258 console.log(tableData.consignmentType); 259 260 $("#past-results-FullSaleName").html(tableData.saleYear + " " + tableData.saleFullName); 261 $("#past-results [id$=wrapper]").hide(); 262 $("#past-results .tablepress-id-".concat(tableData.shortcodeID)).parent().parent().show(); 263 264 }else if(tableData.consignmentType === 'current-consignment') { 265 console.log(tableData.consignmentType); 266 267 $('#current-consignment-date').html(tableData.startDate + ' - ' + tableData.endDate) 268 269 $("#current-consignment-FullSaleName").html(tableData.saleYear + " " + tableData.saleFullName); 270 $("#current-consignment [id$=wrapper]").hide(); 271 $("#current-consignment .tablepress-id-".concat(tableData.shortcodeID)).parent().parent().show(); 272 } 273 274 275 276 attachPedigreeURLS(tableData); 277 278 279 } 280 281 282 283 return { 284 parseJSON : parseJSON, 285 attachPedigreeURLS: attachPedigreeURLS, 286 selectTable: selectTable 287 }; 288}();
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.