1/***** Sidebar Tabs *****/ 2jQuery(document).ready(function() { 3 jQuery('#sidebartabbox').tabs(); 4}); 5 6 7/***Add "nolinkunderline" class to any <a> elements that contain <img /> elements ***/ 8jQuery(document).ready(function() { 9 jQuery("a:has(img)").addClass("nolinkunderline"); 10}); 11 12 13 14/*** HoverIntent on Dropdowns ***/ 15jQuery(document).ready(function(){ 16 jQuery("#ap-top div.ddHoverIntent, #navigation ul li.subscribe").hoverIntent({ 17 interval: 0, 18 over: function(){ jQuery('ul.dropdown', this).addClass('show'); }, 19 timeout: 500, 20 out: function(){ jQuery('ul.dropdown', this).removeClass('show'); } 21 }); 22}); 23 24 25 26/*** Load Tweets ***/ 27jQuery(document).ready(function() { 28 jQuery.getJSON("https://search.twitter.com/search.json?q=from%3Aredwall_hp&rpp=1&callback=?", function(data) { 29 var tweetData = data.results[0]; 30 var tweetText = jQuery('#footer-twitter div.tweet p'); 31 var tweetMeta = jQuery('#footer-twitter div.tweet div.tweetmeta'); 32 var twdt = tweetData.text; 33 var twmta = ''; 34 twdt = twdt.replace(/http:\/\/\S+/g, '<a href="$&">$&</a>'); 35 twdt = twdt.replace(/(^|)@(\w+)/gi, ' @<a href="http://twitter.com/$2">$2</a>'); 36 twmta = '<a href="http://twitter.com/#!/redwall_hp/status/'+tweetData.id_str+'">2 hours ago</a> · '; 37 twmta = twmta + '<a href="https://twitter.com/intent/tweet?in_reply_to='+tweetData.id_str+'&related=redwall_hp">reply</a> · '; 38 twmta = twmta + '<a href="https://twitter.com/intent/retweet?tweet_id='+tweetData.id_str+'&related=redwall_hp">retweet</a> · '; 39 twmta = twmta + '<a href="https://twitter.com/intent/favorite?tweet_id='+tweetData.id_str+'">favorite</a>'; 40 tweetText.html(twdt); 41 tweetMeta.html(twmta); 42 }); 43 44}); 45 46 47 48/*** Live Search ***/ 49jQuery(function() { 50 51 jQuery("#searchforminput").autocomplete({ 52 53 source: function(request, response) { 54 jQuery.ajax({ 55 url: "//www.webmaster-source.com/api/get_search_results/?search="+request.term+"&count=6&callback=?", 56 dataType: "jsonp", 57 success: function(data) { 58 if (data.posts.length > 0) { 59 data.posts.push({ 60 title: "More results...", 61 url: "//www.webmaster-source.com/?s="+encodeURIComponent(request.term) 62 }); 63 } 64 response(jQuery.map(data.posts, function(item) { 65 return { 66 label: item.title, 67 value: item.title, 68 url: item.url 69 } 70 })); 71 } 72 }); 73 }, 74 75 minLength: 3, 76 77 position: { my : "center top", at: "center bottom" }, 78 79 select: function(event, ui) { 80 window.location.href = ui.item.url; 81 } 82 83 }).data("autocomplete")._renderItem = function(ul, item) { 84 return jQuery("<li></li>") 85 .data("item.autocomplete", item) 86 .append("<a>"+ item.label + "</a>") 87 .appendTo(ul); 88 }; 89 90});
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.