PageSourceSearch

https://gbo.ekaraganda.kz/js/photo_read.js

js ekaraganda.kz collected 2026-10-02 05:18:48 UTC 11,453 bytes, 201 lines download raw bytes

1/*при запуске или при изменении разрешения окна{*/
2function photoread_startchange(){
3	var _this = $('#photo_read_universal');
4	var windowheight = $(window).height();
5	var windowwidth = $(window).width();
6	var widthstrelki = (windowwidth-$('#photo_read_universal_cont').width())/2;
7	var windowheight2 = (windowheight-$('#photo_read_universal_cont').height())/2;
8	var mtopstrelki = windowheight2+(_this.find('.photo_read_img').height()/2-70);
9
10	_this.find('.photo_read_click_l').height(windowheight).width(widthstrelki-2);
11	_this.find('.photo_read_click_r').height(_this.find('.photo_read_img').height()+windowheight2).width(widthstrelki+$('#photo_read_universal_cont').width()+2);
12	_this.find('.photo_read_strelka_l').css('margin-top',mtopstrelki+'px');
13	_this.find('.photo_read_strelka_r').css('margin-top',mtopstrelki+'px');
14
15	//перелистовать
16	$( '#photo_read_universal' ).find('.imgfix').on( "swipeleft", function( event ){
17		$('#photo_read_universal').find('.photo_read_click_r').click();
18	});
19	//перелистовать
20	$( '#photo_read_universal' ).find('.imgfix').on( "swiperight", function( event ){
21		$('#photo_read_universal').find('.photo_read_click_l').click();
22	});
23
24}
25$(window).resize(function(){if($('#photo_read_universal').size()==1){photoread_startchange();}});
26/*при запуске или при изменении разрешения окна}*/
27
28/*закрыть{*/
29function photoread_close(){
30	$('#photo_read_universal').fadeOut(800,function(){
31		$('#photo_read_universal').remove();
32		window.location.hash = '#del';
33	});
34}
35/*закрыть}*/
36/*запуск{*/
37function photoread_funct(parametrs){
38	if($('#photo_read_universal').size()==1){$('#photo_read_universal').remove();}
39	if(!parametrs){parametrs = {1 : '1'};}
40		//zaglushka{
41		var _this_act = $(parametrs['global_block']).find(parametrs['element']).eq(parametrs['_this']);
42		if(parametrs['limode'] == true){
43			var _this_act = $(parametrs['global_block']).find(parametrs['elementli']).eq(parametrs['_this']).find(parametrs['element']);
44		}
45		parametrs['zaglushka_img'] = _this_act.attr('href');
46		parametrs['zaglushka_txt'] = _this_act.attr('title');
47		parametrs['zaglushka_date'] = '';//_this_act.find('.date').text();
48		var parametrs_h = '';
49		if(parametrs['h'] && parametrs['h'] !== ''){
50			parametrs_h = '<span class="photo_read_txth">'+parametrs['h']+'</span>';
51		}
52		
53		
54		//parametrs}
55		//parametrs['soc'] = 	'<li><a href=""><span class="vk"></span></a></li><li><a href=""><span class="odn"></span></a></li><li><a href=""><span class="facebook"></span></a></li><li><a href=""><span class="tweet"></span></a></li><li><a href=""><span class="google"></span></a></li><li><a href=""><span class="man"></span></a></li><li><a href=""><span class="in"></span></a></li><li><a href=""><span class="mail"></span></a></li>';
56		//parametrs['h'] = 'Сербия начала переговоры о вступлении в ЕС';
57		//parametrs['li'] = '<li class="act" id="photo_read_id1"><span style="background:url(media/tmp/foto-view_1.jpg) no-repeat center center;"></span><span class="photo_read_hidden"><a href="media/tmp/foto-view.jpg">media/tmp/foto-view.jpg</a><span class="photo_read_txt">Женщина в белградском автобусе смотрит в окно.</span><span class="date">12 января, 2014</span></span></li><li id="photo_read_id2"><span style="background:url(media/tmp/foto-view_2.jpg) no-repeat center center;"></span></li><li id="photo_read_id3"><span style="background:url(media/tmp/foto-view_3.jpg) no-repeat center center;"></span></li><li id="photo_read_id4"><span style="background:url(media/tmp/foto-view_4.jpg) no-repeat center center;"></span></li><li id="photo_read_id5"><span style="background:url(media/tmp/foto-view_1.jpg) no-repeat center center;"></span></li><li id="photo_read_id6"><span style="background:url(media/tmp/foto-view_1.jpg) no-repeat center center;"></span></li><li id="photo_read_id7"><span style="background:url(media/tmp/foto-view_1.jpg) no-repeat center center;"></span></li><li id="photo_read_id8"><span style="background:url(media/tmp/foto-view_2.jpg) no-repeat center center;"></span></li><li id="photo_read_id9"><span style="background:url(media/tmp/foto-view_3.jpg) no-repeat center center;"></span></li><li id="photo_read_id10"><span style="background:url(media/tmp/foto-view_4.jpg) no-repeat center center;"></span></li><li id="photo_read_id11"><span style="background:url(media/tmp/foto-view_1.jpg) no-repeat center center;"></span></li><li id="photo_read_id12"><span style="background:url(media/tmp/foto-view_1.jpg) no-repeat center center;"></span></li>';
58		
59		//parametrs[_this].addClass('act');
60		
61		
62		
63		
64		var photoread_html = '<div id="photo_read_universal" style="display:none;"><div id="photo_read_universal_rel"><div id="photo_read_universal_cont"><div class="photo_read_h"><span class="photo_read_img"><span class="imgfix"><img src="'+parametrs['zaglushka_img']+'" class="photo_read_imgh"><span class="photo_read_opis"><span class="photo_read_txt">'+parametrs['zaglushka_txt']+'</span><span class="photo_read_date">'+parametrs['zaglushka_date']+'</span></span></span><ul class="photo_read_soc">'+parametrs['soc']+'</ul><a href="" target="_blank" class="photo_read_original"></a><a href="javascript:;" class="photo_read_close"></a></span>'+parametrs_h+'</div><div id="photo_read_scroll"><ul>'+parametrs['li']+'</ul></div></div><a href="javascript:;" class="photo_read_click_l"><span class="photo_read_strelka_l"></span></a><a href="javascript:;" class="photo_read_click_r"><span class="photo_read_strelka_r"></span></a></div></div>';
65		$('body').append(photoread_html);
66		$('#photo_read_scroll').find('ul li').eq(parametrs['_this']).addClass('act');
67		window.location.hash = '#'+$('#photo_read_scroll').find('ul li').eq(parametrs['_this']).attr('id');
68		$('#photo_read_universal_cont').find('.photo_read_original').attr('href',_this_act.attr('original'));
69
70		$('#photo_read_universal').fadeIn(800,function(){
71			$('#photo_read_scroll').jScrollPane({verticalDragMinHeight: 100,autoReinitialise: true,showArrows: true});
72		});
73		photoread_startchange();
74	
75		//$(function(){
76			$('#photo_read_universal').find('.photo_read_close').click(function(){photoread_close();});
77			$('#photo_read_scroll').find('ul li').click(function(){
78				if(!$('#photo_read_universal').is('.loading')){
79					photoread_funct_change($(this).index());
80				}
81			});
82			$('#photo_read_universal').find('.photo_read_click_l').click(function(){
83				if(!$('#photo_read_universal').is('.loading')){
84					var index = $('#photo_read_scroll').find('ul li.act').index()-1;
85					if(index<0){index = $('#photo_read_scroll').find('ul li').size()-1;}
86					photoread_funct_change(index);
87					photoread_funct_scrollfix(index);
88				}
89			});
90			$('#photo_read_universal').find('.photo_read_click_r').click(function(){
91				if(!$('#photo_read_universal').is('.loading')){
92					var index = $('#photo_read_scroll').find('ul li.act').index()+1;
93					if(index>$('#photo_read_scroll').find('ul li').size()-1){index = 0;}
94					photoread_funct_change(index);
95					photoread_funct_scrollfix(index);
96				}
97			});
98			$('#photo_read_universal_cont').find('.photo_read_img .imgfix').click(function(){
99				if(!$('#photo_read_universal').is('.loading')){
100					var index = $('#photo_read_scroll').find('ul li.act').index()+1;
101					if(index>$('#photo_read_scroll').find('ul li').size()-1){index = 0;}
102					photoread_funct_change(index);
103					photoread_funct_scrollfix(index);
104				}
105			});
106		//});
107}
108/*запуск}*/
109/*{*/
110	function photoread_funct_scrollfix(index){
111	/*
112		var scroll_left = $('#photo_read_scroll').find('ul li').eq(index).offset().left-$('#photo_read_scroll').find('.jspPane').offset().left;
113		if(scroll_left < $('#photo_read_scroll').find('.jspPane').width()){
114			$('#photo_read_scroll').find('.jspPane').animate({left:scroll_left*-1},800);
115		}
116	*/
117	}
118/*}*/
119/*при загрузки страницы{*/
120function photoread_funct_first(parametrs){
121	if(!parametrs){return false;}
122	if(!parametrs['limode']){parametrs['limode'] = false;}
123	$(parametrs['global_block']).find(parametrs['element']).click(function(){
124		parametrs['li'] = '';
125		$(this).parents(parametrs['global_block']).find(parametrs['element']).each(function(index,element){
126			var id = $(this).attr('id');
127			if(id == ''){id = 'fix'+index;}
128			parametrs['li']+='<li id="photo_read_id'+id+'"><span style="background:url('+$(this).attr('smallimg')+') no-repeat center center;"></span><span class="photo_read_hidden"><a href="'+$(this).attr('original')+'">'+$(this).attr('href')+'</a><span class="photo_read_txt">'+$(this).attr('title')+'</span><span class="date"></span></span></li>';
129		});
130		if(parametrs['limode'] == true){
131			parametrs['_this'] = $(this).parent().index();
132		}else{
133			parametrs['_this'] = $(this).index();
134		}
135		photoread_funct(parametrs);
136		return false;
137	});
138	if(window.location.hash != ''){
139		var hash = window.location.hash;
140		parametrs['li'] = '';
141		var indexfix = 0;
142		$(parametrs['global_block']).find(parametrs['element']).each(function(index,element){
143			var id = $(this).attr('id');
144			if(id == ''){id = 'fix'+index;}
145			if('#photo_read_id'+id == hash){parametrs['_this'] = index;indexfix = 1;}
146			parametrs['li']+='<li id="photo_read_id'+id+'"><span style="background:url('+$(this).attr('smallimg')+') no-repeat center center;"></span><span class="photo_read_hidden"><a href="'+$(this).attr('original')+'">'+$(this).attr('href')+'</a><span class="photo_read_txt">'+$(this).find('.photo_read_hideparametrs_elements .photo_read_txt').text()+'</span><span class="date">'+$(this).find('.photo_read_hideparametrs_elements .date').text()+'</span></span></li>';
147		});
148		
149		if(indexfix == 1){photoread_funct(parametrs);}
150		//parametrs['_this'] = 0;
151		//parametrs['id'] = $(hash);
152		
153		return false;
154	}
155	
156}
157/*при загрузки страницы}*/
158
159
160
161
162/*переключение{*/
163	function photoread_funct_change(id){
164		$('#photo_read_universal').addClass('loading');
165		var old = $('#photo_read_scroll').find('ul li.act').index();
166		old = $('#photo_read_scroll').find('ul li').eq(old);
167		id = $('#photo_read_scroll').find('ul li').eq(id);
168		old.removeClass('act');
169		id.addClass('act');//photo_read_imgh
170		var _this = $('#photo_read_universal_cont').find('.imgfix');
171		_this.fadeOut(800,function(){
172			_this.find('img.photo_read_imgh').remove();
173			_this.append('<img src="'+id.find('.photo_read_hidden a').attr('href')+'" class="photo_read_imgh">');
174			_this.find('img.photo_read_imgh').load(function() {
175				window.location.hash = '#'+id.attr('id');
176				$('#photo_read_universal').find('.photo_read_original').attr('href',id.find('.photo_read_hidden a').text());
177				_this.find('.photo_read_txt').text(id.find('.photo_read_hidden .photo_read_txt').text());
178				_this.find('.photo_read_date').text(id.find('.photo_read_hidden .date').text());
179				_this.fadeIn(800,function(){
180					$('#photo_read_universal').removeClass('loading');
181				});
182				if(_this.find('img.photo_read_imgh').width() > _this.width() && _this.find('img.photo_read_imgh').height() != _this.height()){
183					_this.find('img.photo_read_imgh').addClass('fix');
184				}
185			});
186		});
187		
188		
189	}
190/*переключение}*/
191
192
193
194/*
195$(function(){
196	photoread_startchange();
197
198
199	setTimeout(function () {$('#photo_read_scroll').jScrollPane({verticalDragMinHeight: 100,autoReinitialise: true,showArrows: true});}, 1000);
200});
201*/

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.