PageSourceSearch

https://sedmitza.ru/images/js/jquery.main.js

js sedmitza.ru collected 2026-10-02 10:07:22 UTC 29,160 bytes, 678 lines download raw bytes

1$(document).ready(function(){
2	initGallery ();					// инициализация галереи
3	initSlideShow ();				// инициализация слайдшоу
4	initTabs ();					// инициализация табов
5
6	// загрузим jquery-tmpl-шаблоны
7//	$('#jquery-templates').load('/images/ssi/jquery-templates-lib', function(){
8		initCalendar ();			// инициализация календаря
9		initIndexEncShowBox ();			// инициализация элемента online-магазина православной энциклопедии
10		initFeedback ();			// инициализация формы обратной связи
11//	});
12});
13$(window).load(function(){
14	if ($('#content').size() == 0) return;
15	if ($('.aside').size() == 0) return;
16	if ($('#content').height()>$('.aside').height()) {$('.aside').css('height',$('#content').height())} else {$('#content').css('height',$('.aside').height())};
17});
18function initCalendar () {
19	var calendEl = $(".aside > .calendar");
20	calendEl
21		.on("click", "a.prev,a.next", function(event){
22			event.preventDefault();
23			var el = $(this);
24			makeCalendar(el.data('calendar-year'), el.data('calendar-month'));
25		})
26		.on("click", ".head .years .dropdown-menu > li > a", function(event){
27			event.preventDefault();
28			makeCalendar($(this).text() || calendEl.data('y'), calendEl.data('m'));
29		});
30	makeCalendar();
31}
32function makeCalendar (y, m) {
33	var el = $('.aside > .calendar');
34	var template = $('#CalendarTmpl');
35	if (el.length == 0 || template.length == 0) return;
36
37	var query = el.data('ajax-query');
38	if (_.isString(query)) {
39		try { query = JSON.parse(query) } catch(e) {}
40	}
41
42	// extend if it need...
43	$.getJSON('/rpc.json', {'op':'calendar','cid':el.data('ajax-cid'),'query':JSON.stringify(query),'month':m,'year':y,'current':el.data('ajax-current')}, function(r){
44		el.data('y', parseInt(r.year, 10)).data('m', parseInt(r.month.num));
45		el.empty().append(_.template(template.html(), {'param':r}));
46	}).fail(function(jqxhr, settings, exception){
47		if (window.console) {
48			console.debug(jqxhr, settings, exception);
49		}
50	});
51}
52function loadMediaArchive(el, mediatype, interval, opt) {
53	el = $(el);
54	var template = $('#mediaArchiveItemTmpl');
55	if (el.data('loadMediaArchive') || template.length == 0) {
56		return;
57	}
58	el.data('loadMediaArchive', 1);
59
60	$.getJSON('/rpc.json', {'op':'mediaArchive','mediatype':mediatype,'interval':interval,'opt':JSON.stringify(opt || {})}, function(r){
61		if (r.list) {
62			var ul = el.parents('.media-archive-holder:first').find('ul.' + el.attr('href'));
63			ul.empty().append(_.template(template.html(), {'list':r.list, 'mediatype':mediatype}));
64		} 
65	}).fail(function(jqxhr, settings, exception){
66		if (window.console) {
67			console.debug(jqxhr, settings, exception);
68		}
69	});
70}
71function initIndexEncShowBox() {
72	el = $('#cyclopedia-shop-box');
73	var template = $('#IndexEncShowBoxTmpl');
74	if (el.length == 0 || template.length == 0) return;
75
76	$.getJSON('/shop.json', {'op':'getRandomShopStuff'}, function(r){
77		el.empty().append(_.template(template.html(), {'stuff':r}));
78	}).fail(function(jqxhr, settings, exception){
79		if (window.console) {
80			console.debug(jqxhr, settings, exception);
81		}
82	});
83}
84function initFeedback() {
85	var wait = function(qid, callback) {
86		setTimeout(function(){
87			$.getJSON('/rpc.json', {'op':'wait','qid':qid}, function(result) {
88				if (result.status) {
89					if (result.status != 'OK') {
90						if (result.error) {
91							alert(result.error);
92						} else {
93							alert("При выполнении операции произошла ошибка.\nПожалуйста, сообщите об этом разработчикам.");
94						}
95					} else {
96						if (callback) {
97							callback(result);
98						}
99					}
100				} else { 
101					wait(qid, callback);
102				}
103			});  
104		}, 400);
105	};
106	var template = $('#FeedbackForm');
107	$('#feedback').off().on('click', function(event){
108		if (template.length == 0) {
109			return;
110		}
111		event.preventDefault();
112
113		var m = $(_.template(template.html(), {})).appendTo($('body:first'));
114		m.find('.modal-dialog').css('width', '420px').end()
115		.on('click', 'button.btn', function(){
116			var body = m.find('.feedback-f-div'),
117				params   = {};
118			m.find('input,textarea').each(function(i, inp){ params[$(inp).attr('name')] = $(inp).val() });
119			m.find('.modal-footer').hide();
120			body.empty().addClass('feedback-f-wait-div');
121
122			$.post('/rpc.json', {'op': 'saveFF','data': JSON.stringify(params)},
123				function(r){ 
124					wait(r.wait, function(result){
125							body.removeClass('feedback-f-wait-div').css({'text-align': 'center'})
126								.append('<h3>Ваше сообщение отправлено!</h3>');
127							setTimeout(function(){m.modal('hide')}, 1500);
128						})
129				},
130				'json'
131			);
132		})
133		.on('hide.bs.modal', function(){
134			m.remove();
135		});
136		m.modal();
137	});
138}
139function initTabs (){
140	$('.media-archive-holder').makeTabset({
141		control_holder : '.switch',
142		control: '.switch a',
143		tab : '.media-archive'
144	});
145	$('.album-box .thumbnail-list ul li a').click(function(){
146		if (!$(this).parent().hasClass('active')) {
147			var _index = $('.album-box .thumbnail-list ul li a').index($(this));
148			$(this).parents('.album-box').find('.gallery').hide().eq(_index).show();
149			$(this).parents('.thumbnail-list').find('.active').removeClass('active');
150			$(this).parent().addClass('active');
151		}
152		return false;
153	});
154}
155function initSlideShow (){
156	$('div.promo-gallery').fadeGallery({
157		slideElements:'.gallery ul li',
158		pauseOnHover:true,
159		autoRotation:true,
160		switchTime:4000,
161		duration:650,
162		event:'click',
163		slideText :'.slide-description li'
164	});
165	$('div.album-frame .gallery').fadeGallery({
166		slideElements:'.gallery-frame ul li',
167		pauseOnHover:false,
168		autoRotation:false,
169		switchTime:4000,
170		duration:650,
171		event:'click'
172	});
173}
174function initGallery (){
175	$('div.gallery-box').galleryScroll({
176		duration:300,
177		circleSlide:true,
178		btPrev: 'a.prev',
179		btNext: 'a.next',
180		holderList: 'div.gallery-frame',
181		scrollElParent: 'ul.mover',
182		scrollEl: 'li.slide',
183		slideNum: '.switcher'
184	});
185	$('div.gallery-tools').galleryScroll({
186		duration:300,
187		circleSlide:true,
188		btPrev: 'a.prev',
189		btNext: 'a.next',
190		holderList: 'div.thumbnail-list-holder',
191		scrollElParent: 'ul.thumbnail-list',
192		scrollEl: 'li.slide',
193		slideNum: '.switcher'
194	});
195}
196jQuery.fn.makeTabset = function(o) {
197	o = $.extend( {
198		tab : '.tab',
199		control : '.tabset a',
200		control_holder : '.tabset'
201	}, o);
202	return this.each(function(){
203		var _tabset = jQuery(this);
204		var _control = jQuery(o.control,_tabset);
205		var _control_holder = jQuery(o.control_holder,_tabset);
206		
207		_control_holder.find('li').each(function(){
208			$(this).find('a').attr('href','tab'+($(this).index()+1));
209		});
210		var index = 1;
211		_tabset.find(o.tab).each(function(){
212			$(this).addClass('tab'+index);
213			index += 1;
214		});
215		_control.bind('click',function(){
216			if (!$(this).parent().is('.active')) {
217				_control_holder.find('.active').removeClass('active');
218				_tabset.find(o.tab).hide();
219				var _id = $(this).parent().index();
220				_control_holder.each(function(){
221					$(this).find('li').eq(_id).addClass('active');
222				})
223				_tabset.find(o.tab + '.' + $(this).attr('href')).show();
224			}
225			return false;
226		});
227	});
228};
229jQuery.fn.fadeGallery = function(_options){
230	var _options = jQuery.extend({
231		slideElements:'div.slideset > div',
232		slideText :'.slide-description li',
233		pagerLinks:'ul.switcher',
234		btnNext:'a.next',
235		btnPrev:'a.prev',
236		btnPlayPause:'a.play-pause',
237		pausedClass:'paused',
238		playClass:'playing',
239		activeClass:'active',
240		pauseOnHover:true,
241		autoRotation:false,
242		autoHeight:false,
243		switchTime:3000,
244		duration:650,
245		event:'click'
246	},_options);
247
248	return this.each(function(){
249		var _this = jQuery(this);
250		var _slides = jQuery(_options.slideElements, _this);
251		var _texts = jQuery(_options.slideText, _this);
252		var _pagerLinks = jQuery(_options.pagerLinks, _this);
253		var _btnPrev = jQuery(_options.btnPrev, _this);
254		var _btnNext = jQuery(_options.btnNext, _this);
255		var _btnPlayPause = jQuery(_options.btnPlayPause, _this);
256		var _pauseOnHover = _options.pauseOnHover;
257		var _autoRotation = _options.autoRotation;
258		var _activeClass = _options.activeClass;
259		var _pausedClass = _options.pausedClass;
260		var _playClass = _options.playClass;
261		var _autoHeight = _options.autoHeight;
262		var _duration = _options.duration;
263		var _switchTime = _options.switchTime;
264		var _controlEvent = _options.event;
265
266		var _hover = false;
267		var _prevIndex = 0;
268		var _currentIndex = 0;
269		var _slideCount = _slides.length;
270		var _timer;
271		if(!_slideCount) return;
272		_slides.hide().eq(_currentIndex).show();
273		_texts.hide().eq(_currentIndex).show();
274		if(_autoRotation) _this.removeClass(_pausedClass).addClass(_playClass);
275		else _this.removeClass(_playClass).addClass(_pausedClass);
276
277		if(_btnPrev.length) {
278			_btnPrev.bind(_controlEvent,function(){
279				prevSlide();
280				return false;
281			});
282		}
283		if(_btnNext.length) {
284			_btnNext.bind(_controlEvent,function(){
285				nextSlide();
286				return false;
287			});
288		}
289		if(_pagerLinks.length) {
290			_pagerLinks.each(function(){
291				jQuery('li',$(this)).bind(_controlEvent,function(){
292					if(_currentIndex != $(this).index()) {
293						_prevIndex = _currentIndex;
294						_currentIndex = $(this).index();
295						switchSlide();
296					}
297					return false;
298				});
299			});
300		}
301
302		if(_btnPlayPause.length) {
303			_btnPlayPause.bind(_controlEvent,function(){
304				if(_this.hasClass(_pausedClass)) {
305					_this.removeClass(_pausedClass).addClass(_playClass);
306					_autoRotation = true;
307					autoSlide();
308				} else {
309					if(_timer) clearRequestTimeout(_timer);
310					_this.removeClass(_playClass).addClass(_pausedClass);
311				}
312				return false;
313			});
314		}
315
316		function prevSlide() {
317			_prevIndex = _currentIndex;
318			if(_currentIndex > 0) _currentIndex--;
319			else _currentIndex = _slideCount-1;
320			switchSlide();
321		}
322		function nextSlide() {
323			_prevIndex = _currentIndex;
324			if(_currentIndex < _slideCount-1) _currentIndex++;
325			else _currentIndex = 0;
326			switchSlide();
327		}
328		function refreshStatus() {
329			if (_pagerLinks.length) {
330				_pagerLinks.each(function(){
331					$(this).find('li').removeClass(_activeClass);
332					$(this).find('li').eq(_currentIndex).addClass(_activeClass);
333				})
334			}
335			_slides.eq(_prevIndex).removeClass(_activeClass);
336			_slides.eq(_currentIndex).addClass(_activeClass);
337			_texts.eq(_prevIndex).removeClass(_activeClass);
338			_texts.eq(_currentIndex).addClass(_activeClass);
339		}
340		function switchSlide() {
341			_slides.stop(true,true);
342			_slides.eq(_prevIndex).fadeOut(_duration);
343			_slides.eq(_currentIndex).fadeIn(_duration);
344			_texts.stop(true,true);
345			_texts.eq(_prevIndex).fadeOut(_duration);
346			_texts.eq(_currentIndex).fadeIn(_duration);
347			refreshStatus();
348			autoSlide();
349		}
350
351		function autoSlide() {
352			if(!_autoRotation || _hover) return;
353			if(_timer) clearRequestTimeout(_timer);
354			_timer = requestTimeout(nextSlide,_switchTime+_duration);
355		}
356		if(_pauseOnHover) {
357			_this.hover(function(){
358				_hover = true;
359				if(_timer) clearRequestTimeout(_timer);
360			},function(){
361				_hover = false;
362				autoSlide();
363			});
364		}
365		refreshStatus();
366		autoSlide();
367	});
368}
369/*
370 * Drop in replace functions for setTimeout() & setInterval() that
371 * make use of requestAnimationFrame() for performance where available
372 * http://www.joelambert.co.uk
373 *
374 * Copyright 2011, Joe Lambert.
375 * Free to use under the MIT license.
376 * http://www.opensource.org/licenses/mit-license.php
377 */
378
379// requestAnimationFrame() shim by Paul Irish
380// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
381window.requestAnimFrame = (function() {
382	return  window.requestAnimationFrame   ||
383			window.webkitRequestAnimationFrame ||
384			window.mozRequestAnimationFrame    ||
385			window.oRequestAnimationFrame      ||
386			window.msRequestAnimationFrame     ||
387			function(/* function */ callback, /* DOMElement */ element){
388				window.setTimeout(callback, 1000 / 60);
389			};
390})();
391/**
392 * Behaves the same as setTimeout except uses requestAnimationFrame() where possible for better performance
393 * @param {function} fn The callback function
394 * @param {int} delay The delay in milliseconds
395 */
396
397window.requestTimeout = function(fn, delay) {
398	if( !window.requestAnimationFrame      	&&
399		!window.webkitRequestAnimationFrame &&
400		!window.mozRequestAnimationFrame    &&
401		!window.oRequestAnimationFrame      &&
402		!window.msRequestAnimationFrame)
403			return window.setTimeout(fn, delay);
404
405	var start = new Date().getTime(),
406		handle = new Object();
407
408	function loop(){
409		var current = new Date().getTime(),
410			delta = current - start;
411
412		delta >= delay ? fn.call() : handle.value = requestAnimFrame(loop);
413	};
414
415	handle.value = requestAnimFrame(loop);
416	return handle;
417};
418
419/**
420 * Behaves the same as clearInterval except uses cancelRequestAnimationFrame() where possible for better performance
421 * @param {int|object} fn The callback function
422 */
423window.clearRequestTimeout = function(handle) {
424    window.cancelAnimationFrame ? window.cancelAnimationFrame(handle.value) :
425    window.webkitCancelRequestAnimationFrame ? window.webkitCancelRequestAnimationFrame(handle.value)	:
426    window.mozCancelRequestAnimationFrame ? window.mozCancelRequestAnimationFrame(handle.value) :
427    window.oCancelRequestAnimationFrame	? window.oCancelRequestAnimationFrame(handle.value) :
428    window.msCancelRequestAnimationFrame ? msCancelRequestAnimationFrame(handle.value) :
429    clearTimeout(handle);
430};
431jQuery.fn.galleryScroll = function(_options){
432	var _options = jQuery.extend({
433		btPrev: 'a.link-prev',
434		btNext: 'a.link-next',
435		holderList: 'div',
436		scrollElParent: 'ul',
437		scrollEl: 'li',
438		slideNum: false,
439		duration : 1000,
440		step: false,
441		circleSlide: true,
442		disableClass: 'disable',
443		funcOnclick: null,
444		autoSlide:false,
445		innerMargin:0,
446		stepWidth:false
447	},_options);
448	return this.each(function(){
449		var _this = jQuery(this);
450		var _holderBlock = jQuery(_options.holderList,_this);
451		var _gWidth = _holderBlock.width();
452		var _animatedBlock = jQuery(_options.scrollElParent,_holderBlock);
453		var _liWidth = jQuery(_options.scrollEl,_animatedBlock).outerWidth(true);
454		var _liSum = jQuery(_options.scrollEl,_animatedBlock).length * _liWidth - parseInt(jQuery(_options.scrollEl,_animatedBlock).css('margin-right'));
455		var _margin = -_options.innerMargin;
456		var f = 0;
457		var _step = 0;
458		var _autoSlide = _options.autoSlide;
459		var _timerSlide = null;
460		if (!_options.step) _step = _gWidth; else _step = _options.step*_liWidth;
461		if (_options.stepWidth) _step = _options.stepWidth;
462		
463		if (!_options.circleSlide) {
464			if (_options.innerMargin == _margin)
465				jQuery(_options.btPrev,_this).addClass('prev-'+_options.disableClass);
466		}
467		if (_options.slideNum && !_options.step) {
468			var _lastSection = 0;
469			var _sectionWidth = 0;
470			while(_sectionWidth < _liSum)
471			{
472				_sectionWidth = _sectionWidth + _gWidth;
473				if(_sectionWidth > _liSum) {
474				       _lastSection = _sectionWidth - _liSum;
475				}
476			}
477		}
478		if (_autoSlide) {
479				_timerSlide = setTimeout(function(){
480					autoSlide(_autoSlide);
481				}, _autoSlide);
482			_animatedBlock.hover(function(){
483				clearTimeout(_timerSlide);
484			}, function(){
485				_timerSlide = setTimeout(function(){
486					autoSlide(_autoSlide)
487				}, _autoSlide);
488			});
489		}
490		jQuery(_options.btNext,_this).unbind('click');
491		jQuery(_options.btPrev,_this).unbind('click');
492		jQuery(_options.btNext,_this).bind('click',function(){
493			jQuery(_options.btPrev,_this).removeClass('prev-'+_options.disableClass);
494			if (!_options.circleSlide) {
495				if (_margin + _step  > _liSum - _gWidth - _options.innerMargin) {
496					if (_margin != _liSum - _gWidth - _options.innerMargin) {
497						_margin = _liSum - _gWidth  + _options.innerMargin;
498						jQuery(_options.btNext,_this).addClass('next-'+_options.disableClass);
499						_f2 = 0;
500					} 
501				} else {
502					_margin = _margin + _step;
503					if (_margin == _liSum - _gWidth - _options.innerMargin) {
504						jQuery(_options.btNext,_this).addClass('next-'+_options.disableClass);_f2 = 0;
505					} 					
506				}
507			} else {
508				if (_margin + _step  > _liSum - _gWidth + _options.innerMargin) {
509					if (_margin != _liSum - _gWidth + _options.innerMargin) {
510						_margin = _liSum - _gWidth  + _options.innerMargin;
511					} else {
512						_f2 = 1;
513						_margin = -_options.innerMargin;
514					}
515				} else {
516					_margin = _margin + _step;
517					_f2 = 0;
518				}
519			} 
520			
521			_animatedBlock.animate({marginLeft: -_margin+"px"}, {queue:false,duration: _options.duration });
522			
523			if (_timerSlide) {
524				clearTimeout(_timerSlide);
525				_timerSlide = setTimeout(function(){
526					autoSlide(_options.autoSlide)
527				}, _options.autoSlide);
528			}
529			
530			if (_options.slideNum && !_options.step) jQuery.fn.galleryScroll.numListActive(_margin,jQuery(_options.slideNum, _this),_gWidth,_lastSection);		
531			if (jQuery.isFunction(_options.funcOnclick)) {
532				_options.funcOnclick.apply(_this);
533			}
534			return false;
535		});
536		var _f2 = 1;
537		jQuery(_options.btPrev, _this).bind('click',function(){
538			jQuery(_options.btNext,_this).removeClass('next-'+_options.disableClass);
539			if (_margin - _step >= -_step - _options.innerMargin && _margin - _step <= -_options.innerMargin) {
540				if (_f2 != 1) {
541					_margin = -_options.innerMargin;
542					_f2 = 1;
543				} else {
544					if (_options.circleSlide) {
545						_margin = _liSum - _gWidth  + _options.innerMargin;
546						f=1;_f2=0;
547					} else {
548						_margin = -_options.innerMargin
549					}
550				}
551			} else if (_margin - _step < -_step + _options.innerMargin) {
552				_margin = _margin - _step;
553				f=0;
554			}
555			else {_margin = _margin - _step;f=0;};
556			
557			if (!_options.circleSlide && _margin == _options.innerMargin) {
558				jQuery(this).addClass('prev-'+_options.disableClass);
559				_f2=0;
560			}
561			
562			if (!_options.circleSlide && _margin == -_options.innerMargin) jQuery(this).addClass('prev-'+_options.disableClass);
563			_animatedBlock.animate({marginLeft: -_margin + "px"}, {queue:false, duration: _options.duration});
564			
565			if (_options.slideNum && !_options.step) jQuery.fn.galleryScroll.numListActive(_margin,jQuery(_options.slideNum, _this),_gWidth,_lastSection);
566			
567			if (_timerSlide) {
568				clearTimeout(_timerSlide);
569				_timerSlide = setTimeout(function(){
570					autoSlide(_options.autoSlide)
571				}, _options.autoSlide);
572			}
573			
574			if (jQuery.isFunction(_options.funcOnclick)) {
575				_options.funcOnclick.apply(_this);
576			}
577			return false;
578		});
579		
580		if (_liSum <= _gWidth) {
581			jQuery(_options.btPrev,_this).addClass('prev-'+_options.disableClass).unbind('click');
582			jQuery(_options.btNext,_this).addClass('next-'+_options.disableClass).unbind('click');
583		}
584		// auto slide
585		function autoSlide(autoSlideDuration){
586			//if (_options.circleSlide) {
587				jQuery(_options.btNext,_this).trigger('click');
588			//}
589		};
590		// Number list
591		jQuery.fn.galleryScroll.numListCreate = function(_elNumList, _liSumWidth, _width, _section){
592			var _numListElC = '';
593			var _num = 1;
594			var _difference = _liSumWidth + _section;
595			while(_difference > 0)
596			{
597				_numListElC += '<li><a href="">'+_num+'</a></li>';
598				_num++;
599				_difference = _difference - _width;
600			}
601			jQuery(_elNumList).html('<ul>'+_numListElC+'</ul>');
602		};
603		jQuery.fn.galleryScroll.numListActive = function(_marginEl, _slideNum, _width, _section){
604			if (_slideNum) {
605				jQuery('li',_slideNum).removeClass('active');
606				var _activeRange = _width - _section-1;
607				var _n = 0;
608				if (_marginEl != 0) {
609					while (_marginEl > _activeRange) {
610						_activeRange = (_n * _width) -_section-1 + _options.innerMargin;
611						_n++;
612					}
613				}
614				var _a  = (_activeRange+_section+1 + _options.innerMargin)/_width - 1;
615				_slideNum.each(function(){
616					$(this).find('li').eq(_a).addClass('active');
617				})
618			}
619		};
620		if (_options.slideNum && !_options.step) {
621			jQuery.fn.galleryScroll.numListCreate(jQuery(_options.slideNum, _this), _liSum, _gWidth,_lastSection);
622			jQuery.fn.galleryScroll.numListActive(_margin, jQuery(_options.slideNum, _this),_gWidth,_lastSection);
623			numClick();
624		};
625		function numClick() {
626			jQuery(_options.slideNum, _this).find('a').click(function(){
627				jQuery(_options.btPrev,_this).removeClass('prev-'+_options.disableClass);
628				jQuery(_options.btNext,_this).removeClass('next-'+_options.disableClass);
629				var _indexNum = $(this).parent().index();
630				_margin = (_step*_indexNum) - _options.innerMargin;
631				f=0; _f2=0;
632				if (_indexNum == 0) _f2=1;
633				if (_margin + _step > _liSum) {
634					_margin = _margin - (_margin - _liSum) - _step + _options.innerMargin;
635					if (!_options.circleSlide) jQuery(_options.btNext, _this).addClass('next-'+_options.disableClass);
636				}
637				_animatedBlock.animate({marginLeft: -_margin + "px"}, {queue:false, duration: _options.duration});
638				
639				if (!_options.circleSlide && _margin==0) jQuery(_options.btPrev,_this).addClass('prev-'+_options.disableClass);
640				jQuery.fn.galleryScroll.numListActive(_margin, jQuery(_options.slideNum, _this),_gWidth,_lastSection);
641				if (_timerSlide) {
642					clearTimeout(_timerSlide);
643					_timerSlide = setTimeout(function(){
644						autoSlide(_options.autoSlide)
645					}, _options.autoSlide);
646				}
647				return false;
vendor: 4,674 bytes, lines 648-678
648			});
649		};
650		jQuery(window).resize(function(){
651			_gWidth = _holderBlock.width();
652			_liWidth = jQuery(_options.scrollEl,_animatedBlock).outerWidth(true);
653			_liSum = jQuery(_options.scrollEl,_animatedBlock).length * _liWidth - parseInt(jQuery(_options.scrollEl,_animatedBlock).css('margin-right'));
654			if (!_options.step) _step = _gWidth; else _step = _options.step*_liWidth;
655			if (_options.slideNum && !_options.step) {
656				var _lastSection = 0;
657				var _sectionWidth = 0;
658				while(_sectionWidth < _liSum)
659				{
660					_sectionWidth = _sectionWidth + _gWidth;
661					if(_sectionWidth > _liSum) {
662					       _lastSection = _sectionWidth - _liSum;
663					}
664				};
665				jQuery.fn.galleryScroll.numListCreate(jQuery(_options.slideNum, _this), _liSum, _gWidth,_lastSection);
666				jQuery.fn.galleryScroll.numListActive(_margin, jQuery(_options.slideNum, _this),_gWidth,_lastSection);
667				numClick();
668			};
669		});
670	});
671}
672/*!
673 * Bootstrap v3.2.0 (http://getbootstrap.com)
674 * Copyright 2011-2014 Twitter, Inc.
675 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
676 * Generated using the Bootstrap Customizer (dropdown + modal)
677 */
678if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(t){"use strict";function e(e){e&&3===e.which||(t(s).remove(),t(n).each(function(){var i=o(t(this)),s={relatedTarget:this};i.hasClass("open")&&(i.trigger(e=t.Event("hide.bs.dropdown",s)),e.isDefaultPrevented()||i.removeClass("open").trigger("hidden.bs.dropdown",s))}))}function o(e){var o=e.attr("data-target");o||(o=e.attr("href"),o=o&&/#[A-Za-z]/.test(o)&&o.replace(/.*(?=#[^\s]*$)/,""));var i=o&&t(o);return i&&i.length?i:e.parent()}function i(e){return this.each(function(){var o=t(this),i=o.data("bs.dropdown");i||o.data("bs.dropdown",i=new r(this)),"string"==typeof e&&i[e].call(o)})}var s=".dropdown-backdrop",n='[data-toggle="dropdown"]',r=function(e){t(e).on("click.bs.dropdown",this.toggle)};r.VERSION="3.2.0",r.prototype.toggle=function(i){var s=t(this);if(!s.is(".disabled, :disabled")){var n=o(s),r=n.hasClass("open");if(e(),!r){"ontouchstart"in document.documentElement&&!n.closest(".navbar-nav").length&&t('<div class="dropdown-backdrop"/>').insertAfter(t(this)).on("click",e);var a={relatedTarget:this};if(n.trigger(i=t.Event("show.bs.dropdown",a)),i.isDefaultPrevented())return;s.trigger("focus"),n.toggleClass("open").trigger("shown.bs.dropdown",a)}return!1}},r.prototype.keydown=function(e){if(/(38|40|27)/.test(e.keyCode)){var i=t(this);if(e.preventDefault(),e.stopPropagation(),!i.is(".disabled, :disabled")){var s=o(i),r=s.hasClass("open");if(!r||r&&27==e.keyCode)return 27==e.which&&s.find(n).trigger("focus"),i.trigger("click");var a=" li:not(.divider):visible a",d=s.find('[role="menu"]'+a+', [role="listbox"]'+a);if(d.length){var l=d.index(d.filter(":focus"));38==e.keyCode&&l>0&&l--,40==e.keyCode&&l<d.length-1&&l++,~l||(l=0),d.eq(l).trigger("focus")}}}};var a=t.fn.dropdown;t.fn.dropdown=i,t.fn.dropdown.Constructor=r,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=a,this},t(document).on("click.bs.dropdown.data-api",e).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",n,r.prototype.toggle).on("keydown.bs.dropdown.data-api",n+', [role="menu"], [role="listbox"]',r.prototype.keydown)}(jQuery),+function(t){"use strict";function e(e,i){return this.each(function(){var s=t(this),n=s.data("bs.modal"),r=t.extend({},o.DEFAULTS,s.data(),"object"==typeof e&&e);n||s.data("bs.modal",n=new o(this,r)),"string"==typeof e?n[e](i):r.show&&n.show(i)})}var o=function(e,o){this.options=o,this.$body=t(document.body),this.$element=t(e),this.$backdrop=this.isShown=null,this.scrollbarWidth=0,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};o.VERSION="3.2.0",o.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},o.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},o.prototype.show=function(e){var o=this,i=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(i),this.isShown||i.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.$body.addClass("modal-open"),this.setScrollbar(),this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.backdrop(function(){var i=t.support.transition&&o.$element.hasClass("fade");o.$element.parent().length||o.$element.appendTo(o.$body),o.$element.show().scrollTop(0),i&&o.$element[0].offsetWidth,o.$element.addClass("in").attr("aria-hidden",!1),o.enforceFocus();var s=t.Event("shown.bs.modal",{relatedTarget:e});
vendor: 3,358 bytes, line 678
678i?o.$element.find(".modal-dialog").one("bsTransitionEnd",function(){o.$element.trigger("focus").trigger(s)}).emulateTransitionEnd(300):o.$element.trigger("focus").trigger(s)}))},o.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.$body.removeClass("modal-open"),this.resetScrollbar(),this.escape(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},o.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},o.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",t.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},o.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$element.trigger("hidden.bs.modal")})},o.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},o.prototype.backdrop=function(e){var o=this,i=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var s=t.support.transition&&i;if(this.$backdrop=t('<div class="modal-backdrop '+i+'" />').appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy(function(t){t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),s&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;s?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(150):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var n=function(){o.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",n).emulateTransitionEnd(150):n()}else e&&e()},o.prototype.checkScrollbar=function(){document.body.clientWidth>=window.innerWidth||(this.scrollbarWidth=this.scrollbarWidth||this.measureScrollbar())},o.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.scrollbarWidth&&this.$body.css("padding-right",t+this.scrollbarWidth)},o.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},o.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var i=t.fn.modal;t.fn.modal=e,t.fn.modal.Constructor=o,t.fn.modal.noConflict=function(){return t.fn.modal=i,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(o){var i=t(this),s=i.attr("href"),n=t(i.attr("data-target")||s&&s.replace(/.*(?=#[^\s]+$)/,"")),r=n.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(s)&&s},n.data(),i.data());i.is("a")&&o.preventDefault(),n.one("show.bs.modal",function(t){t.isDefaultPrevented()||n.one("hidden.bs.modal",function(){i.is(":visible")&&i.trigger("focus")})}),e.call(n,r,this)})}(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.