1(function ($) { 2 $(document).ready(function(){ 3 // Hide Captcha and slidedown on focus 4 $('.captcha').hide(); 5 $('.webform-client-form input.form-text, .webform-client-form textarea').focus(function(){ 6 $('.captcha').slideDown('slow'); 7 }); 8 9 // Fix the "jumping" of the jCarousel 10 $('.region-slideshow').css('overflow', 'initial'); 11 12 // Winners page: hide the children of the page you're not on. 13 $('.page-winners #block-menu-menu-side-menu a:not(.active)').closest('.view-grouping .view-grouping-content').hide(); 14 15 // Allow Press page year filtering. 16 $('#block-block-3 .content a, #block-block-10 .content a').click(function(){ 17 var year = $(this).html(); 18 $('.view-press .views-row, .view-press h3').removeClass('hidden'); 19 if(year == 'All'){ 20 // Do Nothing. 21 }else{ 22 $('.view-press .views-row').each(function(){ 23 if(!$(this).hasClass('created-' + year)){ 24 $(this).addClass('hidden'); 25 } 26 }); 27 28 $('.view-press h3').each(function(){ 29 if($(this).html() != year){ 30 $(this).addClass('hidden'); 31 } 32 }); 33 } 34 }); 35 36 // Open external links in new windows. 37 $('a').each(function(){ 38 if(typeof($(this).attr('href')) != 'undefined' && $(this).attr('href').slice(0,7) == 'mailto:'){ 39 $(this).addClass('newWindow'); 40 } 41 42 if (!window.location.origin) { 43 window.location.origin = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port: ''); 44 } 45 46 if(typeof($(this).attr('href')) != 'undefined' && ($(this).attr('href').slice(0, 7) == 'http://' || $(this).attr('href').slice(0, 8) == 'https://') && window.location.origin != $(this).attr('href').slice(0, window.location.origin.length)){ 47 $(this).addClass('newWindow'); 48 } 49 }); 50 51 $('a').click(function(){ 52 if($(this).hasClass('newWindow')){ 53 window.open($(this).attr('href')); 54 return false; 55 } 56 }); 57 58 $('.jcarousel').jcarousel({ 59 wrap: 'circular', 60 center: true, 61 animation: 2000, 62 }); 63 $('.jcarousel').jcarousel('scroll', 1, false); 64 65 setInterval(function(){ 66 $('.jcarousel').jcarousel('scroll', '+=1'); 67 }, 5000); 68 69 70 // Make the billing form fields go inside. 71 $('form .form-text, form .form-textarea').each(function(){ 72 $(this).attr('placeholder', getLabel($(this).attr('id'))); 73 }); 74 75 function getLabel(thisItem){ 76 var thisLabel = $('label[for="' + thisItem + '"]'); 77 var html = thisLabel.html(); 78 if(typeof(html) != 'undefined'){ 79 var label = html.replace(/<.*?>/g, '').trim(); 80 }else{ 81 var label = ''; 82 } 83 return label; 84 } 85 86 87 88 }); // END READY 89 90 $(window).resize(function(){ 91 resizeOverlays(); 92 $('.jcarousel').jcarousel('reload'); 93 $('.jcarousel').jcarousel('scroll', $('.jcarousel').jcarousel('target').index(), false); 94 }); 95 96 $(window).load(function(){ 97 resizeOverlays(); 98 // Add ticket descriptions. 99 var ticketBudInterval = setInterval(function(){ 100 if($('#new_event_purchase').length > 0){ 101 var detailArray = new Object(); 102 detailArray['38274'] = '(17 years & up). $20 at the door, so buy now!<br/>This ticket is for entry to the main show at the Art of the Car Concours.'; 103 detailArray['38275'] = '(16 years & under)<br/>This ticket is for entry to the main show at the Art of the Car Concours. While this ticket is free, please "purchase" one so we can anticpate attendance.'; 104 detailArray['38276'] = '(17 years & up)<br/>This ticket is for early entry to the main show at the Art of the Car Concours.<br/>Come two hours early to enjoy all the festivities with a smaller crowd.<br/>A great time for photography!'; 105 detailArray['38277'] = '(16 years & under)<br/>This ticket is for early entry to the main show at the Art of the Car Concours.<br/>Come two hours early to enjoy all the festivities with a smaller crowd.<br/>A great time for photography!<br/>While this ticket is free, please "purchase" one so we can anticpate attendance.'; 106 detailArray['39725'] = 'For kids! Participate in judging cars for the Hagerty Kids Award.<br/>Contact Brenda Zeller [email protected] for details.'; 107 detailArray['39114'] = 'Enjoy a forum with hot rod historian, restorer, and owner.<br/>The event will take place at:<br/>Miller Nichols Library Room 351 (on the campus of the University of Missouri-Kansas City)<br/>800 E. 51st St., Kansas City, MO 64110'; 108 detailArray['39115'] = 'Everyone is welcome! Enjoy hors d\'oeuvres and refreshments.<br/>This event will take place on the Kansas City Art Institute campus in<br/>Vanderslice Hall: 4415 Warwick Blvd, Kansas City, MO 64111'; 109 110 $.each(detailArray, function(index, value){ 111 $('#product_' + index + ' .product_name').append('<div class="description">' + value + '</div>'); 112 }); 113 114 // Make sure the table columns have classes to style. 115 $('#new_event_purchase table th').each(function(){ 116 $(this).removeAttr('width'); 117 $(this).addClass('column_' + $(this).index()); 118 }); 119 120 clearInterval(ticketBudInterval); 121 } 122 }, 100); 123 124 125 }); 126 127 // Resize the panes. 128 function resizeOverlays(){ 129 overlaySize = ($(document).width() - 962) / 2; 130 $('.view-slideshow .view-header .slideshow-overlay.white').width(overlaySize); 131 132 // The left one needs to be bigger for the not-front. 133 if($('body').hasClass('not-front')){ 134 $('.view-slideshow .view-header .slideshow-overlay.white.left').width(overlaySize + 220); 135 } 136 } 137 138 $(document).ready(function(){ 139 if($('body').hasClass('page-bpt-buy-tickets')){ 140 var eventId = 'edit-event-2490656'; 141 // Remodel the Landing Page for tickets. 142 143 // Add a class to identify the right event. 144 $('#' + eventId).siblings('.bpt-table').first().addClass('activeEvent'); 145 146 // Hide the other events. 147 $('.bpt-table').not('.activeEvent').hide(); 148 149 // Add instructions
150 $('#' + eventId).append('<div class="buyTicketInstructions">Please choose your ticket type and quantity below</div>'); 151 152 // Creat those neat ticket-looking boxes. 153 $('.bpt-table.activeEvent tbody tr').each(function(){ 154 var priceId = $(this).find('select').attr('id'); 155 var title = $(this).children('td').eq(0).children('div').html().trim(); 156 var titleDetails = title.split(' - '); 157 var price = $(this).children('td').eq(1).children('div').html().trim(); 158 var rawPrice = price.replace('$', ''); 159 $('#' + eventId).append('<div class="ticketItem" data-ticket-id="' + priceId + '" data-price="' + rawPrice + '"><div class="incrementor"><div class="button minus">-</div><div class="numberOfTickets">0</div><div class="button plus">+</div></div><div class="ticketDetails"><div class="ticketTitle">' + titleDetails[0] + '</div><div class="ticketAge">' + titleDetails[1] + '</div><div class="ticketPrice">' + price + '</div></div></div>'); 160 }); 161 162 // Add the total box. 163 $('#' + eventId).append('<div class="ticketTotal"><div class="label">Purchase Total:</div><div class="total">$0.00</div></div>'); 164 165 // Make the buttons work. 166 $('.incrementor .button').click(function(){ 167 var ticketId = $(this).closest('.ticketItem').attr('data-ticket-id'); 168 var price = $(this).closest('.ticketItem').attr('data-price'); 169 var numberOfTickets = parseInt($(this).closest('.ticketItem').find('.numberOfTickets').html()); 170 var change = 0; 171 var total = 0; 172 173 if($(this).hasClass('minus')){ 174 change = -1; 175 }else{ 176 change = 1; 177 } 178 179 if(numberOfTickets + change < 0){ 180 numberOfTickets = 0; 181 }else if(numberOfTickets + change > 50){ 182 numberOfTickets = 50; 183 }else{ 184 numberOfTickets += change; 185 } 186 187 $('#' + ticketId).val(numberOfTickets); 188 $(this).closest('.ticketItem').find('.numberOfTickets').html(numberOfTickets); 189 190 $('.ticketItem').each(function(){ 191 total += (parseInt($(this).find('.numberOfTickets').html()) * $(this).attr('data-price')); 192 }); 193 total = total.toFixed(2); 194 $('.ticketTotal .total').html('$' + total); 195 }); 196 } 197 }); 198 199})(jQuery);
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.