1var TIMEOUT = 10000; 2 3//var interval = setInterval(handleNext, 10000); 4var bg_width=$("body").width(); 5 6$(window).resize(function () { 7 bg_width = $("body").width(); 8}); 9 10function handleNext() { 11 12 var $radios = $('input[class*="slide-radio"]'); 13 var $activeRadio = $('input[class*="slide-radio"]:checked'); 14 15 var currentIndex = $activeRadio.index(); 16 var radiosLength = $radios.length; 17 18 $radios 19 .attr('checked', false); 20 21 if (currentIndex >= radiosLength - 1) { 22 23 $radios 24 .first() 25 .attr('checked', true); 26 27 } else { 28 29 $activeRadio 30 .next('input[class*="slide-radio"]') 31 .attr('checked', true); 32 33 } 34 35} 36 37$("#footer_more").click(function () { 38 if ($(this).hasClass("toggled")) { 39 $(".footer").animate({ 40 bottom: 0, 41 avoidTransforms: true 42 }, 400); 43 $("#footer_more i").removeClass("fa fa-minus"); 44 $("#footer_more i").addClass("fa fa-plus"); 45 $("#footer_more span").html("More") 46 } else { 47 $(".footer").animate({ 48 bottom: $(".expanded_footer").outerHeight(), 49 avoidTransforms: true 50 }, 400); 51 $("#footer_more i").removeClass("fa fa-plus"); 52 $("#footer_more i").addClass("fa fa-minus"); 53 $("#footer_more span").html("Less") 54 } 55 $(this).toggleClass("toggled"); 56 return false 57}); 58 59if (bg_width < 768) { 60 $(".expanded_footer_title").each(function () { 61 var url = $(this).attr("data-url"); 62 $(this).wrap('<a href="' + url + '" />') 63 }) 64} 65$(window).click(function () { 66 $(".footer_bubble").removeClass("toggled") 67 $(".footer_bubble").fadeOut() 68 if ($("#footer_more").hasClass("toggled")) { 69 $("#footer_more").trigger("click"); 70 } 71}); 72$(".footer_bubble_button").click(function () { 73 var button = $(this); 74 var target_bubble = $(this).attr("href"); 75 var offset = button.position(); 76 var left = (button.position().left - ($(target_bubble).outerWidth()/2)) + ($(this).outerWidth()/2); 77 $(target_bubble).css({ left: left }); 78 79 if ($(this).hasClass("toggled")) { 80 $(target_bubble).fadeOut(); 81 $(this).removeClass("toggled"); 82 $(".bubble_bg").fadeOut() 83 } else { 84 if ($(".footer_bubble_button").hasClass("toggled")) { 85 $(".footer_bubble").not(target_bubble).fadeOut(function () { 86 $(target_bubble).fadeIn(); 87 $(".footer_bubble_button").not(button).removeClass("toggled") 88 }) 89 } else { 90 $(target_bubble).fadeIn(); 91 $(".bubble_bg").fadeIn() 92 } 93 $(this).addClass("toggled") 94 } 95 return false 96}); 97 98var paginationLeft = ($(".css-slider-wrapper").outerWidth() / 2) - ($(".slider-pagination").outerWidth() / 2); 99$('.slider-pagination').css({ left: paginationLeft }); 100 101$("html").on("click", ".bubble_bg", function (event) { 102 $(".footer_bubble").fadeOut(400); 103 $(".footer_bubble_button").removeClass("toggled"); 104 $(".bubble_bg").fadeOut() 105}); 106$(".qa").hover(function () { 107 $(this).find("img").attr("src").replace("_over", ""); 108 $(this).find("img").attr("src", function (index, src) { 109 return src.replace(".png", "_over.png"); 110 }); 111}, function () { 112 $(this).find("img").attr("src", function (index, src) { 113 return src.replace("_over", ""); 114 }); 115}); 116 117function isValidEmailAddress(emailAddress) { 118 var pattern = /^([a-z\d!#$%&'*+\-\/=?^_`{|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+(\.[a-z\d!#$%&'*+\-\/=?^_`{|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)*|"((([ \t]*\r\n)?[ \t]+)?([\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*(([ \t]*\r\n)?[ \t]+)?")@(([a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF][a-z\d\-._~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]*[a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])\.)+([a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF][a-z\d\-._~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]*[a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])\.?$/i; 119 return pattern.test(emailAddress); 120}; 121function validatePhone(txtPhone) { 122 var a = document.getElementById(txtPhone).value; 123 var filter = /^((\+[1-9]{1,4}[ \-]*)|(\([0-9]{2,3}\)[ \-]*)|([0-9]{2,4})[ \-]*)*?[0-9]{3,4}?[ \-]*[0-9]{3,4}?$/; 124 if (filter.test(removeWSpaces(a))) { 125 return true; 126 } 127 else { 128 return false; 129 } 130} 131 132function removeWSpaces(objVal) { 133 var tString = objVal.replace(/^\s+|\s+$/g, ''); 134 return tString; 135} 136 137function go_to_url(objVal) { 138 var value = selectObject.value; 139 document.location = value; 140} 141 142$(function () { 143 var path = (window.location.pathname || '').toLowerCase(); 144 if (path.indexOf('/page/events-in-nelson-mandela-bay') !== 0) { 145 return; 146 } 147 148 var $eventsIframe = $('iframe[src*="nmbt.co.za/remote/list_events.html"]'); 149 if ($eventsIframe.length === 0) { 150 return; 151 } 152 153 var iframe = $eventsIframe.get(0); 154 if (!iframe) { 155 return; 156 } 157 158 var proxyUrl = '/EventsEmbedProxy.aspx'; 159 var currentSrc = (iframe.getAttribute('src') || '').toLowerCase(); 160 161 iframe.setAttribute('referrerpolicy', 'origin'); 162 163 if (currentSrc.indexOf('/eventsembedproxy.aspx') === -1) { 164 iframe.setAttribute('src', proxyUrl); 165 } 166});
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.