PageSourceSearch

https://www.digitaldeezign.com/wp-content/themes/pptitan/js/supersized.shutter.js?ver=3.0

js digitaldeezign.com collected 2026-10-08 09:09:26 UTC 12,368 bytes, 339 lines download raw bytes

1/*
2
3	Supersized - Fullscreen Slideshow jQuery Plugin
4	Version : 3.2.5
5	Theme 	: Shutter 1.1
6	
7	Site	: www.buildinternet.com/project/supersized
8	Author	: Sam Dunn
9	Company : One Mighty Roar (www.onemightyroar.com)
10	License : MIT License / GPL License
11
12*/
13
14(function($){
15	
16	theme = {
17	 	
18	 	
19	 	/* Initial Placement
20		----------------------------*/
21	 	_init : function(){
22	 		// Hack supersized bug
23	 		vars.image_path = jQuery('#pp_image_path').attr('value');
24
25	 		// Center Slide Links
26	 		if (api.options.slide_links) $(vars.slide_list).css('margin-left', -$(vars.slide_list).width()/2);
27			// Start progressbar if autoplay enabled
28    		if (api.options.autoplay){
29    			if (api.options.progress_bar) theme.progressBar();
30			}else{
31				if ($(vars.play_button).attr('src')) $(vars.play_button).attr("src", vars.image_path + "play.png");	// If pause play button is image, swap src
32				if (api.options.progress_bar) $(vars.progress_bar).stop().animate({left : -$(window).width()}, 0 );	//  Place progress bar
33			}
34			
35			
36			/* Thumbnail Tray
37			----------------------------*/
38			// Hide tray off screen
39			
40			// Thumbnail Tray Toggle
41			$(vars.tray_button).toggle(function(){
42				$(vars.thumb_tray).stop().animate({bottom : 0, avoidTransforms : true}, 300 );
43				$('#controls').stop().animate({ marginTop: '-135px', avoidTransforms : true }, 300);
44				if ($(vars.tray_arrow).attr('src')) $(vars.tray_arrow).attr("src", vars.image_path + "button-tray-down.png");
45				return false;
46			}, function() {
47				$(vars.thumb_tray).stop().animate({bottom : -$(vars.thumb_tray).height(), avoidTransforms : true}, 300 );
48				$('#controls').stop().animate({ marginTop: '0px', avoidTransforms : true }, 300);
49				if ($(vars.tray_arrow).attr('src')) $(vars.tray_arrow).attr("src", vars.image_path + "button-tray-up.png");
50				return false;
51			});
52			
53			// Make thumb tray proper size
54			$(vars.thumb_list).width($('> li', vars.thumb_list).length * $('> li', vars.thumb_list).outerWidth(true));	//Adjust to true width of thumb markers
55			
56			// Display total slides
57			if ($(vars.slide_total).length){
58				$(vars.slide_total).html(api.options.slides.length);
59			}
60			
61			
62			/* Thumbnail Tray Navigation
63			----------------------------*/	
64			if (api.options.thumb_links){
65				//Hide thumb arrows if not needed
66				if ($(vars.thumb_list).width() <= $(vars.thumb_tray).width()){
67					$(vars.thumb_back +','+vars.thumb_forward).fadeOut(0);
68				}
69				
70				// Thumb Intervals
71        		vars.thumb_interval = Math.floor($(vars.thumb_tray).width() / $('> li', vars.thumb_list).outerWidth(true)) * $('> li', vars.thumb_list).outerWidth(true);
72        		vars.thumb_page = 0;
73        		
74        		// Cycle thumbs forward
75        		$(vars.thumb_forward).click(function(){
76        			if (vars.thumb_page - vars.thumb_interval <= -$(vars.thumb_list).width()){
77        				vars.thumb_page = 0;
78        				$(vars.thumb_list).stop().animate({'left': vars.thumb_page}, {duration:500, easing:'easeOutExpo'});
79        			}else{
80        				vars.thumb_page = vars.thumb_page - vars.thumb_interval;
81        				$(vars.thumb_list).stop().animate({'left': vars.thumb_page}, {duration:500, easing:'easeOutExpo'});
82        			}
83        		});
84        		
85        		// Cycle thumbs backwards
86        		$(vars.thumb_back).click(function(){
87        			if (vars.thumb_page + vars.thumb_interval > 0){
88        				vars.thumb_page = Math.floor($(vars.thumb_list).width() / vars.thumb_interval) * -vars.thumb_interval;
89        				if ($(vars.thumb_list).width() <= -vars.thumb_page) vars.thumb_page = vars.thumb_page + vars.thumb_interval;
90        				$(vars.thumb_list).stop().animate({'left': vars.thumb_page}, {duration:500, easing:'easeOutExpo'});
91					}else{
92        				vars.thumb_page = vars.thumb_page + vars.thumb_interval;
93        				$(vars.thumb_list).stop().animate({'left': vars.thumb_page}, {duration:500, easing:'easeOutExpo'});
94        			}
95        		});
96				
97			}
98			
99			
100			/* Navigation Items
101			----------------------------*/
102		    $(vars.next_slide).click(function() {
103		    	api.nextSlide();
104		    });
105		    
106		    $(vars.prev_slide).click(function() {
107		    	api.prevSlide();
108		    });
109		    
110		    	// Full Opacity on Hover
111		    	if(jQuery.support.opacity){
112			    	$(vars.prev_slide +','+vars.next_slide).mouseover(function() {
113					   $(this).stop().animate({opacity:1},100);
114					}).mouseout(function(){
115					   $(this).stop().animate({opacity:0.6},100);
116					});
117				}
118			
119			if (api.options.thumbnail_navigation){
120				// Next thumbnail clicked
121				$(vars.next_thumb).click(function() {
122			    	api.nextSlide();
123			    });
124			    // Previous thumbnail clicked
125			    $(vars.prev_thumb).click(function() {
126			    	api.prevSlide();
127			    });
128			}
129			
130		    $(vars.play_button).click(function() {
131				api.playToggle();						    
132		    });
133			
134			
135			/* Thumbnail Mouse Scrub
136			----------------------------*/
137    		if (api.options.mouse_scrub){
138				$(vars.thumb_tray).mousemove(function(e) {
139					var containerWidth = $(vars.thumb_tray).width(),
140						listWidth = $(vars.thumb_list).width();
141					if (listWidth > containerWidth){
142						var mousePos = 1,
143							diff = e.pageX - mousePos;
144						if (diff > 10 || diff < -10) { 
145						    mousePos = e.pageX; 
146						    newX = (containerWidth - listWidth) * (e.pageX/containerWidth);
147						    diff = parseInt(Math.abs(parseInt($(vars.thumb_list).css('left'))-newX )).toFixed(0);
148						    $(vars.thumb_list).stop().animate({'left':newX}, {duration:diff*3, easing:'easeOutExpo'});
149						}
150					}
151				});
152			}
153			
154			
155			/* Window Resize
156			----------------------------*/
157			$(window).resize(function(){
158				
159				// Delay progress bar on resize
160				if (api.options.progress_bar && !vars.in_animation){
161					if (vars.slideshow_interval) clearInterval(vars.slideshow_interval);
162					if (api.options.slides.length - 1 > 0) clearInterval(vars.slideshow_interval);
163					
164					$(vars.progress_bar).stop().animate({left : -$(window).width()}, 0 );
165					
166					if (!vars.progressDelay && api.options.slideshow){
167						// Delay slideshow from resuming so Chrome can refocus images
168						vars.progressDelay = setTimeout(function() {
169								if (!vars.is_paused){
170									theme.progressBar();
171									vars.slideshow_interval = setInterval(api.nextSlide, api.options.slide_interval);
172								}
173								vars.progressDelay = false;
174						}, 1000);
175					}
176				}
177				
178				// Thumb Links
179				if (api.options.thumb_links && vars.thumb_tray.length){
180					// Update Thumb Interval & Page
181					vars.thumb_page = 0;	
182					vars.thumb_interval = Math.floor($(vars.thumb_tray).width() / $('> li', vars.thumb_list).outerWidth(true)) * $('> li', vars.thumb_list).outerWidth(true);
183					
184					// Adjust thumbnail markers
185					if ($(vars.thumb_list).width() > $(vars.thumb_tray).width()){
186						$(vars.thumb_back +','+vars.thumb_forward).fadeIn('fast');
187						$(vars.thumb_list).stop().animate({'left':0}, 200);
188					}else{
189						$(vars.thumb_back +','+vars.thumb_forward).fadeOut('fast');
190					}
191					
192				}
193			});	
194			
195								
196	 	},
197	 	
198	 	
199	 	/* Go To Slide
200		----------------------------*/
201	 	goTo : function(){
202	 		if (api.options.progress_bar && !vars.is_paused){
203				$(vars.progress_bar).stop().animate({left : -$(window).width()}, 0 );
204				theme.progressBar();
205			}
206		},
207	 	
208	 	/* Play & Pause Toggle
209		----------------------------*/
210	 	playToggle : function(state){
211	 		
212	 		if (state =='play'){
213	 			// If image, swap to pause
214	 			if ($(vars.play_button).attr('src')) $(vars.play_button).attr("src", vars.image_path + "pause.png");
215				if (api.options.progress_bar && !vars.is_paused) theme.progressBar();
216	 		}else if (state == 'pause'){
217	 			// If image, swap to play
218	 			if ($(vars.play_button).attr('src')) $(vars.play_button).attr("src", vars.image_path + "play.png");
219        		if (api.options.progress_bar && vars.is_paused)$(vars.progress_bar).stop().animate({left : -$(window).width()}, 0 );
220	 		}
221	 		
222	 	},
223	 	
224	 	
225	 	/* Before Slide Transition
226		----------------------------*/
227	 	beforeAnimation : function(direction){
228		    if (api.options.progress_bar && !vars.is_paused) $(vars.progress_bar).stop().animate({left : -$(window).width()}, 0 );
229		  	
230		  	/* Update Fields
231		  	----------------------------*/
232		  	// Update slide caption
233		   	if ($(vars.slide_caption).length){
234		   		(api.getField('title')) ? $(vars.slide_caption).html(api.getField('title')) : $(vars.slide_caption).html('');
235		   	}
236		    // Update slide number
237			if (vars.slide_current.length){
238			    $(vars.slide_current).html(vars.current_slide + 1);
239			}
240		    
241		    
242		    // Highlight current thumbnail and adjust row position
243		    if (api.options.thumb_links){
244		    
245				$('.current-thumb').removeClass('current-thumb');
246				$('li', vars.thumb_list).eq(vars.current_slide).addClass('current-thumb');
247				
248				// If thumb out of view
249				if ($(vars.thumb_list).width() > $(vars.thumb_tray).width()){
250					// If next slide direction
251					if (direction == 'next'){
252						if (vars.current_slide == 0){
253							vars.thumb_page = 0;
254							$(vars.thumb_list).stop().animate({'left': vars.thumb_page}, {duration:500, easing:'easeOutExpo'});
255						} else if ($('.current-thumb').offset().left - $(vars.thumb_tray).offset().left >= vars.thumb_interval){
256	        				vars.thumb_page = vars.thumb_page - vars.thumb_interval;
257	        				$(vars.thumb_list).stop().animate({'left': vars.thumb_page}, {duration:500, easing:'easeOutExpo'});
258						}
259					// If previous slide direction
260					}else if(direction == 'prev'){
261						if (vars.current_slide == api.options.slides.length - 1){
262							vars.thumb_page = Math.floor($(vars.thumb_list).width() / vars.thumb_interval) * -vars.thumb_interval;
263							if ($(vars.thumb_list).width() <= -vars.thumb_page) vars.thumb_page = vars.thumb_page + vars.thumb_interval;
264							$(vars.thumb_list).stop().animate({'left': vars.thumb_page}, {duration:500, easing:'easeOutExpo'});
265						} else if ($('.current-thumb').offset().left - $(vars.thumb_tray).offset().left < 0){
266							if (vars.thumb_page + vars.thumb_interval > 0) return false;
267	        				vars.thumb_page = vars.thumb_page + vars.thumb_interval;
268	        				$(vars.thumb_list).stop().animate({'left': vars.thumb_page}, {duration:500, easing:'easeOutExpo'});
269						}
270					}
271				}
272				
273				
274			}
275		    
276	 	},
277	 	
278	 	
279	 	/* After Slide Transition
280		----------------------------*/
281	 	afterAnimation : function(){
282	 		if (api.options.progress_bar && !vars.is_paused) theme.progressBar();	//  Start progress bar
283	 	},
284	 	
285	 	
286	 	/* Progress Bar
287		----------------------------*/
288		progressBar : function(){
289    		$(vars.progress_bar).stop().animate({left : -$(window).width()}, 0 ).animate({ left:0 }, api.options.slide_interval);
290    	}
291	 	
292	 
293	 };
294	 
295	 
296	 /* Theme Specific Variables
297	 ----------------------------*/
298	 $.supersized.themeVars = {
299	 	
300	 	// Internal Variables
301		progress_delay		:	false,				// Delay after resize before resuming slideshow
302		thumb_page 			: 	false,				// Thumbnail page
303		thumb_interval 		: 	false,				// Thumbnail interval
304		image_path			:	'images/',				// Default image path
305													
306		// General Elements							
307		play_button			:	'#pauseplay',		// Play/Pause button
308		next_slide			:	'#nextslide',		// Next slide button
309		prev_slide			:	'#prevslide',		// Prev slide button
310		next_thumb			:	'#nextthumb',		// Next slide thumb button
311		prev_thumb			:	'#prevthumb',		// Prev slide thumb button
312		
313		slide_caption		:	'#slidecaption',	// Slide caption
314		slide_current		:	'.slidenumber',		// Current slide number
315		slide_total			:	'.totalslides',		// Total Slides
316		slide_list			:	'#slide-list',		// Slide jump list							
317		
318		thumb_tray			:	'#thumb-tray',		// Thumbnail tray
319		thumb_list			:	'#thumb-list',		// Thumbnail list
320		thumb_forward		:	'#thumb-forward',	// Cycles forward through thumbnail list
321		thumb_back			:	'#thumb-back',		// Cycles backwards through thumbnail list
322		tray_arrow			:	'#tray-arrow',		// Thumbnail tray button arrow
323		tray_button			:	'#tray-button',		// Thumbnail tray button
324		
325		progress_bar		:	'#progress-bar'		// Progress bar
326	 												
327	 };												
328	
329	 /* Theme Specific Options
330	 ----------------------------*/												
331	 $.supersized.themeOptions = {					
332	 						   
333		progress_bar		:	1,		// Timer for each slide											
334		mouse_scrub			:	0		// Thumbnails move with mouse
335		
336	 };
337	
338	
339})(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.