PageSourceSearch

https://www.saopaulo.sp.leg.br/wp-content/plugins/slickr-flickr/scripts/public.js

js saopaulo.sp.leg.br collected 2026-10-09 04:38:51 UTC 5,574 bytes, 149 lines download raw bytes

1var slickr_flickr_slideshow_timer;
2var slickr_flickr_slideshow_timer_on = false;
3
4jQuery.noConflict();
5
6function slickr_flickr_next_slide(obj) {
7    var j = jQuery(obj);
8    if (j.children('div').length == 1)  return ;
9    options = j.parent().data("options");    
10    if (('autoplay' in options) && (options['autoplay'] == false)) return;   
11    var $active = j.children('div.active');
12    if ( $active.length == 0 ) $active = j.children('div:last');
13    var $next =  $active.next().length ? $active.next() : j.children('div:first');
14
15    $active.addClass('last-active');
16    $next.css({opacity: 0.0})
17        .addClass('active')
18        .animate({opacity: 1.0}, options['transition'], function() {
19            $active.removeClass('active last-active');
20        });
21}
22
23function slickr_flickr_next_slides() {
24   jQuery('.slickr-flickr-slideshow').each(function(index){
25   		s=jQuery(this);
26        if (! s.hasClass('responsive')) slickr_flickr_next_slide(s) ;
27   });
28}
29
30function slickr_flickr_set_slideshow_height(slideshow,imgheight,divheight) {
31    var s = jQuery(slideshow);
32    s.find('div img').css("max-height",imgheight+"px");
33    s.css("height", divheight+"px");
34}    
35
36function slickr_flickr_set_slideshow_width(slideshow,width) {
37    var s = jQuery(slideshow);
38    s.find('div img').css("max-width",width+"px");
39    s.css("width",width+"px");
40} 
41
42function slickr_flickr_set_slideshow_click(slideshow,link,target) {
43    var s = jQuery(slideshow);
44    if (link=='next') 
45    	s.unbind('click').click( function() {  slickr_flickr_next_slide(s) ; });
46	else if (link=='toggle') 
47		s.unbind('click').click( function() {  slickr_flickr_toggle_slideshows() ; });
48	else 
49		if (target == "_self")
50			s.unbind('click').click( function() {  window.location = link.replace(/\\/g, ''); }); 
51		else
52			s.unbind('click').click( function() {  window.open(link.replace(/\\/g, ''),target); }); 		
53}
54
55function slickr_flickr_toggle_slideshows() {
56   if (slickr_flickr_slideshow_timer_on)
57       slickr_flickr_stop_slideshows();
58   else
59       slickr_flickr_start_slideshows();
60}
61
62function slickr_flickr_stop_slideshows() {
63    clearTimeout(slickr_flickr_slideshow_timer);
64    slickr_flickr_slideshow_timer_on = false;
65}
66
67function slickr_flickr_start_slideshows() {
68    var mindelay = 0;
69    var mintimeout = 0;
70    jQuery('.slickr-flickr-slideshow').each(function(index){
71     var s =jQuery(this);
72   	 options = s.parent().data('options');
73   	 if (options) {
74 	    if (s.hasClass('responsive')) {
75    		if (('timeout' in options) && (options['timeout'] != '')) {
76    			timeout = options['timeout'];
77    		    if ((!(timeout == undefined)) && ((mintimeout == 0) || (timeout < mintimeout))) mintimeout = timeout;
78    		} 		
79    	} else {
80    		if (('link' in options) && (options['link'] != ''))  slickr_flickr_set_slideshow_click(s,options['link'],options['target']);
81    		if (('width' in options) && (options['width'] != ''))  slickr_flickr_set_slideshow_width(s,options['width']);
82     		if (('height' in options) && (options['height'] != ''))  {
83     			imgheight = parseInt(options['height']);
84     			divheight = imgheight+ (s.hasClass("nocaptions") ? 0 : 30);
85     			if (s.hasClass("descriptions")) divheight += 50;
86 	    		slickr_flickr_set_slideshow_height(s,imgheight,divheight);
87 			}
88    		if (('delay' in options) && (options['delay'] != '')) {
89    			delay = options['delay'];
90    		    if ((!(delay == undefined)) && ((mindelay == 0) || (delay < mindelay))) mindelay = delay;
91    		} 		 
92		}
93	  }
94    });
95	if (mindelay > 0) {
96		slickr_flickr_stop_slideshows();
97	    slickr_flickr_slideshow_timer = setInterval("slickr_flickr_next_slides()",mindelay);
98	    slickr_flickr_slideshow_timer_on = true;
99    }
100	if (mintimeout > 0) {
101	  jQuery('.slickr-flickr-slideshow.responsive').each(function(index){
102    	var s =jQuery(this);
103   		options = s.parent().data('options');
104   		if (options) {
105    		options['timeout'] = mintimeout;
106			s.find('ul').responsiveSlides(options);
107		}
108	  });
109    }
110
111}
112
113function slickr_flickr_start() {    
114    if (jQuery('.slickr-flickr-galleria').length > 0) {
115    	jQuery(".slickr-flickr-galleria").each(function(index){
116    	    var $options = jQuery(this).parent().data("options");
117    	    var lazy = ('thumbnails' in $options) && ($options['thumbnails'] == 'lazy');
118    	    jQuery(this).galleria($options);
119			if (lazy) Galleria.ready( function(options) { this.lazyLoadChunks( 10, 200); } );
120    	});
121    } 
122    
123    jQuery(".slickr-flickr-gallery").find('img').hover( 
124		function(){ jQuery(this).addClass('hover');},
125		function(){ jQuery(this).removeClass('hover');}); 	
126		
127    jQuery(".slickr-flickr-gallery").each( function (index) {	
128        $options = jQuery(this).parent().data("options");
129  		if ($options && ('border' in $options) && ($options['border'] != '')) {
130  			$id = jQuery(this).parent().attr('id');
131	 		jQuery('<style type="text/css">#'+$id+' img.hover{ background-color:'+$options['border']+'; }</style>').appendTo('head');
132 		}
133 		if (jQuery(this).hasClass('sf-lightbox')) {
134  			jQuery(this).find('a').each( function (ind) { 
135  				jQuery(this).click( function(e) { 
136					e.preventDefault();
137					e.stopPropagation();
138 	        		var lg = jQuery(this).closest('.sf-lightbox').parent();
139 	        		var options = lg.data("options");
140					options['start'] = ind; 
141  					lg.lightGallery(options); 
142  				} );
143  			});
144 		}
145 	});
146 	 
147    slickr_flickr_start_slideshows();
148
149}

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.