PageSourceSearch

https://www.sterevan.ru/includes/jquery/colorbox/init_colorbox.js

js sterevan.ru collected 2026-10-04 20:47:56 UTC 2,031 bytes, 56 lines download raw bytes

1$(function() {
2
3// internationalization
4$.extend($.colorbox.settings, {
5current: LANG_CBOX_IMAGE + " {current} " + LANG_CBOX_FROM + " {total}",
6previous: LANG_CBOX_PREVIOUS,
7next: LANG_CBOX_NEXT,
8close: LANG_CBOX_CLOSE,
9xhrError: LANG_CBOX_XHR_ERROR,
10slideshowStop: LANG_CBOX_SLIDESHOWSTOP,
11slideshowStart: LANG_CBOX_SLIDESHOWSTART,
12imgError: LANG_CBOX_IMG_ERROR
13});
14
15//подхватываем от lightbox
16$( '.lightbox-enabled' ).colorbox({rel: 'gal', transition: "none", maxWidth:"95%", maxHeight:"95%", 
17		title: function(){
18			return $(this).children('img').attr('alt');
19		}
20
21});
22
23//статьи анонсы и основной текст .not('a img:first-child').wrap(function()
24$('.con_text img:not(.nobox), img:not(.nobox), .con_desc img:not(.nobox), .media-gird .media-object').not('a img:first-child').wrap(function(){
25	var ahref = $('<a href="' + $(this).attr('src') + '" />').colorbox({
26	rel: 'gal', transition: "none", maxWidth:"95%", maxHeight:"95%", 
27		title: function(){
28			return $(this).children('img').attr('alt');
29		}
30	});
31	return ahref;
32});
33
34//добавление класса вручную в шаблоне
35$('a.photobox').colorbox({ rel: 'gal', transition: "none", slideshow: true, width: "1024px", height: "683px" });
36
37$( '.bd_image_small' ).each( function(){
38	var regex = /(small\/|medium\/)/;
39	var link = $( this ).attr( 'src' );
40    $( this ).wrap( '<a class="orig" href="' + link.replace( regex, 'medium/' ) + '" />' );
41    $( '.orig').colorbox({ transition: "none" });
42});
43
44//для вставленых через бб-редактор
45$( '.bb_img img' ).not('a img:first-child').each( function(){
46	var link = $( this ).attr( 'src' );
47    $( this ).wrap( '<a class="bb_photo" href="' + link + '" />' );
48    $( '.bb_photo').colorbox({ transition: "none" });
49});
50
51//для бб-редактора вставленные с уменьшением
52$( '.forum_zoom a' ).each( function(){
53    $( this ).colorbox({ transition: "none" });
54});
55
56});

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.