1jQuery(document).ready(function($) { 2 3 var History = window.History; // Note: We are using a capital H instead of a lower h 4 5 $('h1.page-title').wrapInner('<span/>'); 6 7 $('a[rel=fancybox]').fancybox({ 8 buttons : [ 9 'slideShow', 10 'share', 11 'zoom', 12 'fullScreen', 13 'download', 14 'close' 15 ], 16 loop: false 17 }); 18 $('.type-page h2, .has-shows-shortcode h2.entry-title, h2.decorated, #blog #comments h2').wrapInner('<span/>'); 19 20 $('ul li:last-child, article:last-child').addClass('last'); 21 $('ul li:first-child, article:first-child').addClass('first'); 22 $('footer nav ul li:last-child span.separator').hide(); 23 24 $('#middle .inner').find('article').first().addClass('first'); 25 $('article.odd:last-child').addClass('oddlast'); 26 27 $('.textwidget').addClass('clearfix'); 28 29 $('.cycle').cycle({ 30 timeout: 6000, 31 speed: 1500, 32 pause: true, 33 prev: '#prev', 34 next: '#next' 35 }); 36 37 // addthis.button('.extra',{"ui_click":true}); 38 39 if($('img.attachment-bottom-full-width-promo').length) { 40 $('img.attachment-bottom-full-width-promo').appendTo('#main .container_24:not("#page-top")').show(); 41 } 42 43 $('.sidebar .inner').each(function() { 44 $(this).find('.widget_sp_image').last().addClass('last'); 45 }); 46 47 $('ul.anchors li a').click(function(e) { 48 $($(this).attr('href')).goTo(); 49 $($(this).attr('href')).yellowFade('#fd8c58'); 50 }); 51 $('.backtotop').click(function(e) { 52 $('body').goTo(); 53 e.preventDefault(); 54 }); 55 56 $("ul.tabs").each(function() { 57 $(".tabcontent",$(this).parents('aside')).not(':first').hide(); 58 $("li a",$(this)).click(function(e){ 59 $currentbox = $(this).parents('aside'); 60 $tabslist = $(this).parents('ul.tabs'); 61 var activeTab = $(this).attr("href"); //save the clicked links target 62 $("li a",$tabslist).removeClass("active"); // remove pre-highlighted tabs 63 $(this).addClass("active"); //set this link to highlight 64 $(".tabcontent",$currentbox).hide(); // again hide pre-showing div 65 $(activeTab).fadeIn(); //match the target div & show it 66 e.preventDefault(); 67 }); 68 }); 69 70 if($('.addthis_sharing_toolbox','.showfull').length) { 71 72// if(!$('meta[property="og:image"]').length) { $('head').append('<meta property="og:image" content="">'); } 73// $('meta[property="og:image"]').attr('content',$('.attachment-thumbnail',$('.showfull')).attr('src')); 74// $('meta[property="og:description"]').attr('content',$('.addthis_counter',$('.showfull')).attr('addthis:description')); 75// $('head').append('<meta class="fbinfo" property="og:description" content="'+$('.addthis_counter',$('.showfull')).attr('addthis:description')+'" /> '); 76// $('head').append('<meta class="fbinfo" property="og:url" content="'+$('.addthis_counter',$('.showfull')).attr('addthis:url')+'" /> '); 77// $('head').append('<meta class="fbinfo" property="og:title" content="'+$('.addthis_counter',$('.showfull')).attr('addthis:title')+'" /> '); 78 79 } 80 81 $showtemp = ''; 82 $('.expandshow').on('click',function(e) { 83 $showlink = $(this); 84 $('a.collapseshow').trigger('click'); 85 $("body").append('<div id="showtemp_'+$(this).parents('article').attr('id')+'" style="display: none;">' + $(this).parents('article').html() + '</div>'); 86 $(this).html('<img src="'+WPURLS.templateurl+'/images/loading.gif">'); 87 $(this).parents('footer').find('a.icon').hide(); 88 $(this).parents('article').goTo(); 89 $(this).parents('article').load($(this).attr('href') + ' .showfull > *', function() { 90 if($(this).hasClass('has-shows-shortcode')) { 91 $(this).addClass('show'); 92 } 93 $(this).addClass('showfull').find('a.collapseshow').css('visibility','visible'); 94 $(this).hide().animate({ height: 'toggle' }, function() { 95 $(this).goTo(); 96 $title = $('h2.show-title:eq(0)',$(this)).addClass('collapseshow').text() + " | " + WPURLS.blogname; 97 $new_href = $showlink.attr('href'); 98 $slug = $showlink.attr('id'); 99// $.getScript('http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4fd2125e1a5db5ac'); 100/* 101 $('head').append('<meta class="fbinfo" property="og:image" content="'+$('.attachment-thumbnail',$(this)).attr('src')+'" /> '); 102 $('head').append('<meta class="fbinfo" property="og:url" content="'+$('.addthis_counter',$(this)).attr('addthis:url')+'" /> '); 103 $('head').append('<meta class="fbinfo" property="og:title" content="'+$('.addthis_counter',$(this)).attr('addthis:title')+'" /> '); 104 $('head').append('<meta class="fbinfo" property="og:description" content="'+$('.addthis_counter',$(this)).attr('addthis:description')+'" /> '); 105*/ 106
107 $('.expandable').addReadMores(); 108 109 // addthis.toolbox(".addthis_sharing_toolbox"); 110 // addthis.counter(".addthis_counter"); 111// addthis.layers.refresh(); 112 // addthis.init(); 113 114 History.pushState({ 115 type: "show", 116 a_id: $slug 117 }, $title, $new_href); 118 }); 119 }); 120 e.preventDefault(); 121 }); 122 $(document).on('click', '.collapseshow', function(e) { 123 e.preventDefault(); 124 var $article = $(this).parents('article'); 125 $article.animate({ height: 'toggle' }, function() { 126 $(this).goTo(); 127 History.back(); 128 }); 129 }); 130 131 History.Adapter.bind(window, "statechange", function () { 132 var hs = History.getState(); 133 hs.data.type || goback(); 134 }); 135 136 function goback() { 137 $('.showfull footer').find('a.icon').show(); 138 $('.showfull').each(function() { 139 var $showFull = $(this); 140 $showFull.animate({ height: 'toggle' }, function() { 141 $showFull.html($('#showtemp_'+$showFull.attr('id')).html()).removeClass('showfull').css('height','auto'); 142 $('#showtemp_'+$showFull.attr('id')).remove(); 143 144 // Check if .showfull has .has-shows-shortcode class 145 if ($showFull.hasClass('has-shows-shortcode')) { 146 // If it does, remove the .show class 147 $showFull.removeClass('show'); 148 } 149 }); 150 }); 151 } 152 $('.band-title, h2.collapseshow').on('hover',function() { 153 $(this).toggleClass('hover'); 154 }); 155 $('.band-title').on('click',function() { 156 $(this).removeClass('hover'); 157 $(this).parents('.show').find('a.expandshow').trigger('click'); 158 }); 159 160 $('#home-promo').smoothDivScroll({ 161 autoScrollingMode: 'always', 162 autoScrollDirection: 'endlessloopright', 163 mousewheelScrolling: false, 164 manualContinuousScrolling: true, 165 autoScrollingStep: 1, 166 autoScrollingInterval: 43, 167 hotSpotScrollingStep: 8, 168 mouseOverLeftHotSpot: function() { 169 $('#home-promo').smoothDivScroll('startAutoScroll'); 170 }, 171 mouseOverRightHotSpot: function() { 172 $('#home-promo').smoothDivScroll('startAutoScroll'); 173 } 174 }); 175 176 $('#home-promo').bind("mouseover",function() { 177 $(this).smoothDivScroll('stopAutoScrolling'); 178 }).bind("mouseout", function() { 179 $(this).smoothDivScroll('startAutoScrolling'); 180 }); 181 182 183 (function($) { 184 $.fn.goTo = function() { 185 $('html, body').animate({ 186 scrollTop: $(this).offset().top + 'px' 187 }, 'slow'); 188 return this; // for chaining... 189 } 190 })(jQuery); 191 192 // Grab all the excerpt class 193 (function($) { 194 $.fn.addReadMores = function() { 195 $(this).expander({ 196 slicePoint: 1000, // default is 100 197 expandPrefix: '... ', // default is '... ' 198 expandText: '[read more]', // default is 'read more' 199 collapseTimer: 0, // re-collapses after 5 seconds; default is 0, so no re-collapsing 200 userCollapseText: '[read less]', // default is 'read less' 201 expandSpeed: 0, 202 collapseSpeed: 0 203 204 }); 205 return this; // for chaining... 206 } 207 })(jQuery); 208 $('.expandable').addReadMores(); 209 210 $('.band_audio').on('click',function(e) { 211 e.preventDefault(); 212 $band_audio = $(this).attr('href'); 213 $popup_content = '#band_audio_' + $(this).attr('data-id'); 214 $nowlistening = $(this).attr('data-info'); 215 216 $.fancybox({ 217 type : 'inline', 218 href : $popup_content, 219 afterLoad : function() { 220 var myCirclePlayer = new CirclePlayer("#jquery_jplayer_1", 221 { 222 mp3: $band_audio 223 }, { 224 cssSelectorAncestor: $popup_content + " .cp-container", 225 swfPath: WPURLS.templateurl + "/js/circleplayer/js", 226 wmode: "window", 227 supplied:"mp3" 228 }); 229 }, 230 beforeClose : function() { 231 $("#jquery_jplayer_1").jPlayer("pause"); 232 }, 233 title: $nowlistening 234 }); 235 }); 236 237 $('#calendar').fullCalendar({ 238 239 editable: false, 240 241 events: { 242 url: WPURLS.ajaxurl, 243 type: 'POST', 244 data: { 245 action : 'myajax-submit', 246 file : $('#calendar').attr('data-file'), 247 filter : $('.legend li a.selected').attr('data-filter'), 248 filter_post_type : $('ul.legend li a.selected').attr('data-filter-post-type') 249 }, 250 error: function() { 251 alert('there was an error while fetching events!'); 252 } 253 }, 254 255 timeFormat: 'h(:mm)tt', 256 contentHeight: 600, 257 258 header: { 259 left: 'title', 260 center: '', 261 right: 'prevYear,prev,today,next,nextYear' 262 }, 263 264 loading: function(bool) { 265 if (bool) $('#loading').show(); 266 else $('#loading').hide(); 267 }, 268 269 viewDisplay: function(view) { 270 $('.fc-header-title h2').wrapInner('<span/>'); 271 if(!$('.toplegend').length) { 272 $('ul.legend').clone().appendTo('#middle .inner').addClass('toplegend'); 273 } 274 }, 275 276 eventRender: function(event, element) { 277 element.qtip({ 278 content: event.description, 279 position: { 280 target: 'mouse', 281 adjust: { 282 x: 10, 283 y: 10 284 } 285 }, 286 style: { 287 classes: 'ui-tooltip-rounded ui-tooltip-shadow ui-tooltip-dark' 288 }, 289 events: { 290 render: function(event, api) { 291 $('.ui-tooltip ul li:last-child').addClass('last'); 292 $('.ui-tooltip ul li:first-child').addClass('first'); 293 } 294 } 295 }); 296 } 297 }); 298 $('ul.legend li a').on('click',function(e) { 299 if($(this).hasClass('selected')) { 300 $('ul.legend li a').removeClass('selected'); 301 } else { 302 $('ul.legend li a').removeClass('selected'); 303 $('a',$('ul.legend li:eq('+$(this).parent('li').index()+')')).addClass('selected'); 304 if(!$(this).hasClass('selected')) { $(this).addClass('selected'); } 305 } 306 $('#calendar').fullCalendar( 'removeEvents').fullCalendar('removeEventSource',WPURLS.ajaxurl); 307 $('#calendar').fullCalendar('addEventSource',{ 308 url: WPURLS.ajaxurl, 309 type: 'POST', 310 data: { 311 action : 'myajax-submit', 312 file : $('#calendar').attr('data-file'), 313 filter : $('ul.legend li a.selected').attr('data-filter'), 314 filter_post_type : $('ul.legend li a.selected').attr('data-filter-post-type') 315 }}); 316 e.preventDefault(); 317 }); 318 319 var a = $('#s').autocomplete({ 320 serviceUrl:WPURLS.ajaxurl, 321 minChars:2, 322 delimiter: /(,|;)\s*/, // regex or character 323 maxHeight:400, 324 width:300, 325 zIndex: 9999, 326 deferRequestBy: 0, //miliseconds 327 params: { action:'myajax-bands-submit' }, //aditional parameters 328 noCache: false, //default is false, set to true to disable caching 329 onSelect: function(value,data) { if(value.length) { $('#searchform').submit(); } } 330 }); 331 332}); 333 334(function($) { 335 $.fn.yellowFade = function(color) { 336 this.animate( { backgroundColor: color }, 1000 ).animate( { backgroundColor: "#F7F8F7" }, 1500, null, function() { this.style.backgroundColor='transparent'; } ); 337 } 338})(jQuery); 339 340(function($) { 341 342 $.fn.imagePreview = function(xOffset,yOffset) { 343 if(!xOffset) xOffset = -20; 344 if(!yOffset) yOffset = 5; 345 346 // these 2 variable determine popup's distance from the cursor 347 // you might want to adjust to get the right result 348 349 /* END CONFIG */ 350 $(this).hoverIntent(function(e){ 351 this.t = this.title; 352 this.title = ""; 353 var newimgsrc = $(this).attr('data-image'); 354 $("#preview").remove(); 355 $("body").append("<div id='preview' class='loading' />"); 356 // wrap our new image in jQuery, then: 357 var img = new Image(); 358 $(img).load(function () { 359 $(this).hide(); 360 $('#preview').removeClass('loading').empty().append(this); 361 $(this).fadeIn(); 362 }).attr('src', newimgsrc); 363 364 $("#preview") 365 .css("top",(e.pageY - xOffset) + "px") 366 .css("left",(e.pageX + yOffset) + "px") 367 .fadeIn("fast"); 368 }, 369 function(){ 370 this.title = this.t; 371 $("#preview").remove(); 372 }); 373 $(this).mousemove(function(e){ 374 $("#preview") 375 .css("top",(e.pageY - xOffset) + "px") 376 .css("left",(e.pageX + yOffset) + "px"); 377 }); 378 } 379 380})(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.