1$(document).ready(function() { 2 Cufon.replace('.rewrite_book, #subnav a, #directory_heading a, #region_list a, #region_list .area_name, #region_list .area_name2, #region_list .area_notes, #bottom_links a, #right_links a, div#bottom_cats a, #page_heading, .main_heading, .alt_heading, #town_right_links', {fontFamily: 'Verdana, Arial', hover: 'true'}); 3 4 if(document.getElementById('bottom_navigate')) { 5 $('#top_navigate').html(''+$('#bottom_navigate').html()+''); 6 } 7 8 $('select.town_search_select').change(function() { 9 $(this).closest('form').submit(); 10 }); 11 12}); 13$(function() { 14 $('.hide').hide(); 15 $('.townh').hide(); 16 $('.daily_calendar').datepicker({ 17 minDate: "-0d", 18 maxDate: "+2y", 19 onSelect: function(dateText) { 20 var dateSplit = dateText.split("/"); 21 postWith('daily_events_diary.html', {search: 'true', exactdate: ''+toTimestamp(dateSplit[2], dateSplit[0], dateSplit[1], 0, 0, 0)+''}); 22 } 23 }); 24 $('.events_calendar').datepicker({ 25 minDate: "-0d", 26 maxDate: "+2y", 27 onSelect: function(dateText) { 28 var dateSplit = dateText.split("/"); 29 postWith(window.location.href, {search: 'true', exactdate: ''+toTimestamp(dateSplit[2], dateSplit[0], dateSplit[1], 0, 0, 0)+''}); 30 } 31 }); 32 $('.cycle').cycle({ 33 fx: 'fade', 34 prev: '#prev', 35 next: '#next', 36 timeout: 0 37 }); 38 $('.banrot').cycle({ 39 fx: 'fade', 40 timeout: 5000, 41 cleartypeNoBg: true 42 }); 43 $('.main_heading').hover(function() { 44 $(this).children('.rollover').stop(true, true).animate({bottom: '0px'}); 45 }, function() { 46 $(this).children('.rollover').stop(true, true).animate({bottom: '-29px'}); 47 }); 48 49 50 $('.showmap1').hoverIntent({ 51 sensitivity: 3, 52 interval: 50, 53 timeout: 200, 54 over: function() {$('.map').hide(); $('.map1').show();} 55 }); 56 $('.showmap2').hoverIntent({ 57 sensitivity: 3, 58 interval: 50, 59 timeout: 200, 60 over: function() {$('.map').hide(); $('.map2').show();} 61 }); 62 $('.showmap3').hoverIntent({ 63 sensitivity: 3, 64 interval: 50, 65 timeout: 200, 66 over: function() {$('.map').hide(); $('.map3').show();} 67 }); 68 $('.showmap4').hoverIntent({ 69 sensitivity: 3, 70 interval: 50, 71 timeout: 200, 72 over: function() {$('.map').hide(); $('.map4').show();} 73 }); 74 $('.showmap5').hoverIntent({ 75 sensitivity: 3, 76 interval: 50, 77 timeout: 200, 78 over: function() {$('.map').hide(); $('.map5').show();} 79 }); 80 $('.showmap6').hoverIntent({ 81 sensitivity: 3, 82 interval: 50, 83 timeout: 200, 84 over: function() {$('.map').hide(); $('.map6').show();} 85 }); 86 $('.area_title').hover(function() { 87 var mapName = $(this).attr('rel'); 88 if(mapName !== "") { 89 $('#mapFooterImg').attr('src','images/maps/'+mapName+''); 90 } 91 }, function() { 92 $('#mapFooterImg').attr('src','images/maps/default.png'); 93 }); 94 $('#header, #banner, #topads, #leftcol, #rightcol, .conwrap').mouseover(function() { 95 $('.map').hide(); 96 }); 97}); 98function toTimestamp(year,month,day,hour,minute,second){ 99 var datum = new Date(Date.UTC(year,month-1,day,hour,minute,second)); 100 return datum.getTime()/1000; 101} 102 103function postWith(to, p) { 104 var myForm = document.createElement("form"); 105 myForm.method="post" ; 106 myForm.action = to ; 107 for (var k in p) { 108 var myInput = document.createElement("input") ; 109 myInput.setAttribute("name", k) ; 110 myInput.setAttribute("value", p[k]); 111 myForm.appendChild(myInput) ; 112 } 113 document.body.appendChild(myForm) ; 114 myForm.submit() ; 115 document.body.removeChild(myForm) ; 116} 117function toggleShowHide(element, linkelement) { 118 $(''+element+'').toggle(); 119 if($(''+element+'').css('display') == "block") { 120 $(linkelement).text('VIEW LESS <'); 121 } else { 122 $(linkelement).text('VIEW ALL >'); 123 } 124} 125function switchImage(imageid, imagesrc, zoomid, largeimagesrc) { 126 $('#'+imageid).attr('src', ''+imagesrc+''); 127 $('#'+zoomid).attr('href', ''+largeimagesrc+''); 128 return false; 129} 130function switchAdImage(imageid, imagesrc) { 131 $('#'+imageid).attr('src', ''+imagesrc+''); 132 return false; 133} 134function changeItem(id) { 135 $('.item').addClass('hide').hide(); 136 $('.item'+id).removeClass('hide').show(); 137} 138 139/* New Maps */ 140function switchMap(image, mapid) { 141 $('#'+mapid).attr('src','images/maps/'+image+''); 142 return false;
143} 144function switchMapFooter(image) { 145 $('#mapFooterImg').attr('src','images/maps/'+image+''); 146 return false; 147} 148 149/* Classifieds */ 150function paypalCheckout(key) { 151 if(key !== '') { 152 $.ajax({ 153 type: "POST", 154 url: "ajax/classifieds.paypal.php", 155 data: 'key='+key, 156 timeout: 10000, 157 error: function() { 158 alert('There was a problem, please try again later.'); 159 }, 160 success: function(html) { 161 $('#paypalgen').html(html); 162 $('#paypalWait').show(); 163 setTimeout("$('.paypalsubmit').trigger('click');", [500]); 164 } 165 }); 166 } 167 return false; 168} 169function confirmAction(delUrl, delMessage) { 170 if (confirm(delMessage)) { 171 document.location = delUrl; 172 } 173} 174function othertown(value) { 175 if(value == "Other") { 176 $('.newtown').show(); 177 $('.entertown2').val(''); 178 } else { 179 $('.newtown').hide(); 180 $('.entertown2').val(''); 181 } 182} 183 184/* Footer Links */ 185function loadPageLinks() { 186 $('#relevant_articles').slideToggle(600); 187} 188 189(function($){ 190 $.fn.textareaCounter = function(options) { 191 // setting the defaults 192 // $("textarea").textareaCounter({ limit: 100 }); 193 var defaults = { 194 limit: 250 195 }; 196 var options = $.extend(defaults, options); 197 198 // and the plugin begins 199 return this.each(function() { 200 var obj, text, wordcount, limited; 201 202 obj = $(this); 203 obj.after('<span style="font-size: 11px; clear: both; margin-top: 3px; display: block;" id="counter-text">Max. '+options.limit+' words</span>'); 204 205 obj.keyup(function() { 206 text = obj.val(); 207 if(text === "") { 208 wordcount = 0; 209 } else { 210 wordcount = $.trim(text).split(" ").length; 211 } 212 if(wordcount > options.limit) { 213 $("#counter-text").html('<span style="color: #DD0000;">0 words left</span>'); 214 limited = $.trim(text).split(" ", options.limit); 215 limited = limited.join(" "); 216 $(this).val(limited); 217 } else { 218 $("#counter-text").html((options.limit - wordcount)+' words left'); 219 } 220 }); 221 }); 222 }; 223})(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.