1/* ÐÑплÑвание изобÑажений */ 2 3jQuery(function($) { 4 5 if (typeof $.fn.fancybox !== 'undefined') { 6 7 var gallery = $('a[href$=".png"], a[href$=".jpg"], a[href$=".jpeg"], a[href$=".gif"]'); 8 9 gallery.click(function() { 10 11 $.fancybox.open(gallery, { 12 infobar: true, 13 loop: true, 14 }, gallery.index(this)); 15 16 return false; 17 18 }); 19 20 } 21 22}); 23 24 25/* ÐбоÑаÑивание ÑÐ°Ð±Ð»Ð¸Ñ */ 26 27jQuery(function($) { 28 29 $('.content > table').wrap('<div class="table_wrapper"></div>'); 30 31}); 32 33 34/* ÐÐ»Ð°Ð²Ð½Ð°Ñ Ð¿ÑокÑÑÑка */ 35 36jQuery(function($) { 37 38 $('a[href*="#"]').click(function() { 39 40 var explode = $(this).attr('href').split("#"), id; 41 42 if (explode.length > 1) { 43 id = "#" + explode[1]; 44 } else { 45 id = "#" + explode[0]; 46 } 47 48 var element = $(id); 49 50 var offset = 80; 51 52 if (element.length) { 53 54 $('html, body').stop().animate({ 55 'scrollTop': element.offset().top - offset 56 }, 1000); 57 58 return false; 59 60 } 61 62 }); 63 64}); 65 66 67/* Ð¡Ð»Ð°Ð¹Ð´ÐµÑ Ð½Ð° главной */ 68 69jQuery(function($) { 70 71 if (typeof $.fn.flickity !== 'undefined') { 72 73 $('.popular_box').each(function() { 74 75 var carousel = $('.slider', this), buttons = $('.buttons > span', this); 76 77 carousel.flickity({ 78 wrapAround: true, 79 prevNextButtons: false, 80 pageDots: false, 81 adaptiveHeight: false, 82 cellSelector: '.slide', 83 imagesLoaded: true, 84 cellAlign: 'left' 85 }); 86 87 buttons.click(function() { 88 carousel.flickity('select', $(this).index()); 89 }); 90 91 carousel.on('select.flickity', function() { 92 var flkty = carousel.data('flickity'); 93 buttons.removeClass('active').eq(flkty.selectedIndex).addClass('active'); 94 }); 95 96 }); 97 98 } 99 100}); 101 102 103/* РейÑинг запиÑей */ 104 105jQuery(function($) { 106 107 $('.social_box .like').on('click', function() { 108 109 var button = $(this), id = button.data('id'), num = 1; 110 111 $.ajax({ 112 type: "POST", 113 data: { 114 action: 'post_rating', 115 rating_vote: num, 116 nonce: template.nonce, 117 post_id: id 118 }, 119 url: template.ajaxurl, 120 dataType: 'json', 121 success: function(data) { 122 123 if (data.error) alert(data.error); 124 125 if (data.rating) { 126 button.find('span').text(data.rating); 127 } 128 129 } 130 }); 131 132 return false; 133 134 }); 135 136});
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.