1"use strict"; 2 3jQuery(document).ready(function($){ 4 jQuery('.menu li a').click(function() { 5 var href = jQuery(this).attr('href'); 6 jQuery("html, body").animate({ scrollTop: jQuery(href).offset().top - 90 }, 1000); 7 return false; 8 }); 9 /*resp videos*/ 10 jQuery("body, .blogpostcategory").fitVids(); 11 12 /*category slider*/ 13 jQuery( ".category-slider" ).each(function() { 14 var id = jQuery(this).attr('value'); 15 jQuery('.'+id).bxSlider({ 16 easing : 'easeInOutQuint', 17 captions: true, 18 speed: 800, 19 pagerCustom: '.bx-pager' 20 }); 21 }); 22 23 /*blog hover image*/ 24 jQuery( ".blogpostcategory" ).each(function() { 25 var img = jQuery(this).find('img'); 26 var height = img.height(); 27 var width = img.width(); 28 var over = jQuery(this).find('a.overdefultlink'); 29 over.css({'width':width+'px', 'height':height+'px'}); 30 var margin_left = parseInt(width)/2 - 18 31 var margin_top = parseInt(height)/2 - 18 32 over.css('backgroundPosition', margin_left+'px '+margin_top+'px'); 33 }); 34 35 /*resp menu*/ 36 jQuery('.resp_menu_button').click(function() { 37 if(jQuery('.event-type-selector-dropdown').attr('style') == 'display: block;') 38 jQuery('.event-type-selector-dropdown').slideUp({ duration: 500, easing: "easeInOutCubic" }); 39 else 40 jQuery('.event-type-selector-dropdown').slideDown({ duration: 500, easing: "easeInOutCubic" }); 41 }); 42 jQuery('.event-type-selector-dropdown').click(function() { 43 jQuery('.event-type-selector-dropdown').slideUp({ duration: 500, easing: "easeInOutCubic" }); 44 }); 45 46 /*add submenu class*/ 47 jQuery('.menu > li').each(function() { 48 if(jQuery(this).find('ul').size() > 0 ){ 49 jQuery(this).addClass('has-sub-menu'); 50 } 51 }); 52 53 /*animate menu*/ 54 jQuery('ul.menu > li').hover(function(){ 55 jQuery(this).find('ul').stop(true,true).fadeIn(300); 56 }, 57 function () { 58 jQuery(this).find('ul').stop(true,true).fadeOut(300); 59 }); 60 61 /*scroll menu*/ 62 var menu = jQuery('.mainmenu'); 63 jQuery( window ).scroll(function() { 64 if(!menu.isOnScreen() && jQuery(this).scrollTop() > 350){ 65 jQuery(".totop").fadeIn(200); 66 jQuery(".fixedmenu").slideDown(200);} 67 else{ 68 jQuery(".fixedmenu").slideUp(200); 69 jQuery(".totop").fadeOut(200);} 70 }); 71 72 /*top src*/ 73 jQuery('.top-search-form i').click(function() { 74 jQuery('.top-search-form input').slideToggle( "fast", function() {}); 75 }); 76 77 /*tabs*/ 78 $(function() { 79 $( "#pmc-tabs" ).tabs( { selected: 1 }); 80 }); 81 jQuery('#pmc-tabs li a').click(function() { 82 jQuery('.content.blog .pmc-tabs').fadeOut(0).fadeIn(0); 83 }); 84 85 jQuery('.tab1').click(function() { 86 jQuery('.infinity-more').show(); 87 }); 88 89 jQuery('.tab2').click(function() { 90 jQuery('.infinity-more').hide(); 91 }); 92 93 /*infinity scroll*/ 94 $('#tabs-1').infinitescroll({ 95 navSelector : '.wp-pagenavi', // selector for the paged navigation 96 nextSelector : '.wp-pagenavi a:first', // selector for the NEXT link (to page 2) 97 itemSelector : '#tabs-1', // selector for all items you'll retrieve 98 delay: 300, 99 loading: { 100 finishedMsg: '', 101 msgText: '', 102 speed: 0, 103 }, 104 } 105 ); 106 107 $(window).unbind('.infscr'); 108 109 $('.infinity-more').click(function(){ 110 $(document).trigger('retrieve.infscr'); 111 $("body, .blogpostcategory").fitVids(); 112 return false; 113 }); 114 $(document).ajaxError(function(e,xhr,opt){ 115 if (xhr.status == 404) $('.infinity-more').remove(); 116 }); 117 118 var addthis_config = addthis_config||{}; 119 addthis_config.data_track_addressbar = false; 120 121}); 122 123 124jQuery.fn.isOnScreen = function(){ 125 126 var win = jQuery(window); 127 128 var viewport = { 129 top : win.scrollTop(), 130 left : win.scrollLeft() 131 }; 132 viewport.right = viewport.left + win.width(); 133 viewport.bottom = viewport.top + win.height(); 134 135 if(this.offset()){ 136 var bounds = this.offset(); 137 bounds.right = bounds.left + this.outerWidth(); 138 bounds.bottom = bounds.top + this.outerHeight(); 139 140 return (!(viewport.right < bounds.left || viewport.left > bounds.right || viewport.bottom < bounds.top || viewport.top > bounds.bottom)); 141 } 142}; 143 144
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.