PageSourceSearch

https://www.instax.dk/wp-content/themes/instaxeu/js/site.js?ver=20250602

js instax.dk collected 2026-09-30 10:32:52 UTC 22,698 bytes, 730 lines download raw bytes

1function isMobileWidth() {
2    return $('#mobile-indicator').is(':visible');
3}
4
5function isPhabletWidth() {
6    return $('#phablet-indicator').is(':visible');
7}
8
9function isTabletWidth() {
10    return $('#tablet-indicator').is(':visible');
11}
12
13function isNotebookWidth() {
14    return $('#notebook-indicator').is(':visible');
15}
16
17$(function(){
18	$('.for-slicknav ul.menu').slicknav({
19		appendTo: '#slicknav-container',
20		label: '',
21		closedSymbol: '',
22        openedSymbol: '',
23		allowParentLinks: true,
24		init: function () {
25			$('.slicknav_nav li.menu-item').each(function(){
26				$(this).children('a').css('background-color', $(this).data('background'));
27			});
28			$('#menu .cameras-sub-menu-mobile').remove();
29			$('#menu .printers-sub-menu-mobile').remove();
30			$('.slicknav_nav > li.menu-item > a.slicknav_item > .sub-menu-block').remove();
31		},
32	});
33});
34
35$(document).ready(function() {
36	$('#copyright').on('click', function(){
37		$('#wpadminbar').remove();
38	});
39});
40
41/*
42  Check if element is in viewport
43*/
44
45$.fn.isInViewport = function() {
46    var elementTop = $(this).offset().top;
47    var elementBottom = elementTop + $(this).outerHeight();
48
49    var viewportTop = $(window).scrollTop();
50    var viewportBottom = viewportTop + $(window).height();
51
52    return elementBottom > viewportTop && elementTop < viewportBottom;
53};
54
55/*
56  Nav sub menu
57*/
58
59$(function(){	
60	$('[id^=menu-primary-menu] .has-sub-menu-block').hover( function() {
61		$(this).addClass( 'active' );
62	}, function() {
63		$(this).removeClass( 'active' );
64	});
65});
66
67$(window).on('load resize', function() {
68	
69	var wm = ws = ww = pwm = pws = pww = 0,
70		wt = pwt = $('.nav-divider').outerWidth()*2;
71	
72	/*
73	  Resize camera nav headings to fit
74	*/
75	$('#cameras-sub-menu.split-by-type .sub-menu-block-item').each(function(){
76		
77		var w = $(this).outerWidth();
78		
79		wt += w;
80		
81		if( $(this).hasClass('sub-menu-block-item-mini') ){wm += w;};
82		if( $(this).hasClass('sub-menu-block-item-square') ){ws += w;};
83		if( $(this).hasClass('sub-menu-block-item-wide') ){ww += w;};
84		
85	});
86	
87	$('#cameras-sub-menu.split-by-type .nav-film-icon-mini').width( Math.round(wm/wt*100)+'%' ).css('opacity', '1');
88	$('#cameras-sub-menu.split-by-type .nav-film-icon-square').width( Math.round(ws/wt*100)+'%' ).css('opacity', '1');
89	$('#cameras-sub-menu.split-by-type .nav-film-icon-wide').width( Math.round(ww/wt*100)+'%' ).css('opacity', '1');
90	
91	/*
92	  Resize 'group by type' printer nav headings to fit
93	*/
94	$('#printers-sub-menu.split-by-type .sub-menu-block-item').each(function(){
95		
96		var w = $(this).outerWidth();
97		
98		pwt += w;
99		
100		if( $(this).hasClass('sub-menu-block-item-mini') ){pwm += w;};
101		if( $(this).hasClass('sub-menu-block-item-square') ){pws += w;};
102		if( $(this).hasClass('sub-menu-block-item-wide') ){pww += w;};
103		
104	});
105	
106	$('#printers-sub-menu.split-by-type .nav-film-icon-mini').width( Math.round(pwm/pwt*100)+'%' ).css('opacity', '1');
107	$('#printers-sub-menu.split-by-type .nav-film-icon-square').width( Math.round(pws/pwt*100)+'%' ).css('opacity', '1');
108	$('#printers-sub-menu.split-by-type .nav-film-icon-wide').width( Math.round(pww/pwt*100)+'%' ).css('opacity', '1');
109	
110	/*
111	  Resize camera nav images
112	*/
113	var maxHeight = 100;
114	
115	$('.split-by-type .sub-menu-block-img, .split-by-device-type .sub-menu-block-img').height(maxHeight);
116	
117	$('.split-by-type .sub-menu-block-img img, .split-by-device-type .sub-menu-block-img img').each(function() {
118		maxHeight = maxHeight < $(this).height() ? maxHeight : $(this).height();
119	});
120
121	$('.split-by-type .sub-menu-block-img, .split-by-device-type .sub-menu-block-img').each(function() {
122		$(this).height(maxHeight);
123	});
124});
125
126/*
127  Comparison gallery - used on comparison tool and 'which_instax_compare_view' page section
128*/
129
130function update_gallery(thisSwatchItem) {
131	var gallery = $(thisSwatchItem).closest('.gallery'),
132		color = $(thisSwatchItem).data('color');
133		
134	$(gallery).find('.gallery-image.current, .swatch-item.current, .swatch-item-name.current, .explore-image-container.current, .variation-retailers.current').removeClass('current');
135	$(gallery).find('.gallery-image[data-color='+color+'], .swatch-item[data-color='+color+'], .swatch-item-name[data-color='+color+'], .explore-image-container[data-color='+color+'], .variation-retailers[data-color='+color+']').addClass('current');
136	
137}
138
139$(document).ready(function() {
140	$('.swatch-item').on('click',function(){
141		update_gallery($(this));
142	});
143});
144
145/*
146  Vimeo embed
147*/
148
149$(document).ready(function() {
150	$(document).on('click', '.vimeo-wrap .vs-sound', function() {
151		var video = $(this).parent().find('iframe');
152		var player = new Vimeo.Player(video);
153		
154		if( $(this).hasClass('vs-off') ){
155			player.setVolume(1);
156			$(this).removeClass('vs-off').addClass('vs-on');
157		} else if ( $(this).hasClass('vs-on') ){
158			player.setVolume(0);
159			$(this).removeClass('vs-on').addClass('vs-off');
160		}
161	});
162	
163	$('.vimeo-wrap').each(function() {
164		var video = $(this).find('iframe');
165		var sound = $(this).find('.vs-sound');
166		var player = new Vimeo.Player(video);
167		
168		$(window).on('load resize scroll', function() {
169			if( $(video).isInViewport() ) {
170				player.play();
171			} else {
172				player.pause();
173				player.setVolume(0);
174				$(sound).removeClass('vs-on').addClass('vs-off');
175			}
176		});
177	});
178});
179
180/*
181  Page section - full size video
182*/
183
184$(document).ready(function() {
185	$('.full-screen-video.has-audio video, .full-screen-video.has-audio .video-sound').on('click', function() {
186		var section = $(this).closest('.full-screen-video');
187		if ($(section).find('video').prop('muted')) {
188			$(section).find('.video-sound').removeClass('video-sound-off');
189			$(section).find('video').prop('muted', false);
190		} else {
191			$(section).find('.video-sound').addClass('video-sound-off');
192			$(section).find('video').prop('muted', true);
193		}
194	});
195});
196
197$(document).ready(function() {
198	$('.full-screen-video .continue, .full-screen-vimeo-video .continue').on('click',function(){
199		$('html, body').animate( {scrollTop: $(this).offset().top -30 }, 'slow' );
200	});
201});
202
203/*
204  Page section - cameras/printers/film
205*/
206
207var width = $(window).width();
208function cpf_text() {
209	$('.cpf .big-text').textfill({
210		maxFontPixels: 0,
211		success: function() {
212			$('.cpf .big-text span').css('opacity','1');
213		},
214	});
215}
216
217$(window).on('load', function() {
218	cpf_text();
219});
220
221$(window).on('resize', function() {
222	/*
223	Only trigger these functions if the width changes
224	*/
225	if ( $(this).width() !== width ) {
226		width = $(this).width();
227		cpf_text();
228	};
229});
230
231/*
232  Page section - explore cameras
233*/
234
235function switch_explore(section) {
236	var cameraSection = $(section).data('section'),
237		filmSize = $(section).data('size');
238	
239	$('.explore-indicator .carriage').removeClass('mini square wide').addClass(filmSize);
240	$('.explore-section').removeClass('current');
241	$('.explore-section.'+cameraSection).addClass('current');
242	$('html, body').animate( {scrollTop: $('.explore-section.'+cameraSection).offset().top -160 }, 'slow' );
243}
244
245function switch_explore_tablet(section) {
246	var cameraSection = $(section).data('section');
247
248	$('.explore-section.'+cameraSection).slideToggle().toggleClass('open');
249	if( $('.explore-section.'+cameraSection).hasClass('open') ){
250		$('html, body').animate( {scrollTop: $('.explore-section.'+cameraSection).offset().top -60 }, 'slow' );
251	}
252}
253
254$(document).ready(function() {
255	$('.explore-switch').on('click',function(){
256		switch_explore($(this));
257	});
258	$('.explore-switch-tablet').on('click',function(){
259		switch_explore_tablet($(this));
260	});
261});
262
263var exploreScreenSize = 0;
264function explore_sections() {
265	
266	if( !isTabletWidth() ) {
267		$('.explore-cameras .explore-section').css('display', '').removeClass('open');
268		if( exploreScreenSize === 0 ) {
269			$('.explore-cameras .explore-section-mini').addClass('current');
270			exploreScreenSize = 1;
271		}
272	} else {
273		if( exploreScreenSize === 1 ) {
274			$('.explore-cameras .explore-section').removeClass('current open');
275			$('.explore-cameras .explore-indicator .carriage').removeClass('mini square wide')
276			exploreScreenSize = 0;
277		}
278	}
279	
280}
281
282$(document).ready(function() {
283	explore_sections()
284});
285
286$(window).on('resize', function() {
287	explore_sections()
288});
289
290/*
291  Film
292*/
293
294function init() {
295	// Setup size click event
296	$('.size-select-item').on('click', function () {
297		update_size($(this));
298	});
299	// Setup style swatch click event
300	$('.style-swatch').on('click', function () {
301		update_style($(this));
302	});
303
304	$('.size-select-item:first').click();
305	$('.style-swatch:first').click();
306	init_scroll();
307}
308
309function update_size(selectedItem) {
310	var size = selectedItem.data('size');
311	$('.size-select-item').removeClass('current');
312	selectedItem.addClass('current');
313
314	$('[data-size]').removeClass('current');
315	$('[data-size=' + size + ']').addClass('current');
316
317	// auto select the first swatch of the size
318	var firstSwatch = $('.current .style-swatch:first');
319	update_style(firstSwatch);
320	update_scroll();
321}
322
323function update_style(selectedItem) {
324	$('.style-swatch').removeClass('current');
325	selectedItem.addClass('current');
326
327	var id = selectedItem.data('filmid');
328	var filmElement = $('.style-film[data-filmid=' + id + ']');
329	$('.style-film[data-filmid]').removeClass('current');
330	filmElement.addClass('current');
331
332	// copy the link from the film to the right buy link (shown on desktop)
333	var href = filmElement.find('.btn').attr('href');
334	if (!href) {
335		$('#buyFilmDirectBtn').addClass('disabled').attr('href', href);
336	} else {
337		$('#buyFilmDirectBtn').removeClass('disabled').attr('href', href);
338	}
339
340	update_scroll();
341
342}
343
344function init_scroll() {
345	var scrollAmount = 186;
346	var wrapper = $('.scroll-items');
347
348	// scroll swatch scroller left/right on arrow click
349	$('.scroll-arrow-next').on('click', function () {
350		var scrollLeft = wrapper.scrollLeft();
351		var nextScrollLeft = scrollLeft + scrollAmount;
352		wrapper.animate({ scrollLeft: nextScrollLeft });
353	});
354
355	$('.scroll-arrow-prev').on('click', function () {
356		var scrollLeft = wrapper.scrollLeft();
357		var nextScrollLeft = scrollLeft - scrollAmount;
358		wrapper.animate({ scrollLeft: nextScrollLeft });
359	});
360
361	update_scroll();
362}
363
364// detect if the swatch scroller should show arrows whenever the window resizes
365$(window).resize(function () {
366	update_scroll();
367});
368
369/**
370 * Change when the previous and next arrows show on the swatch scroller.
371 * Should only be shown if the swatches exceed the width of its container.
372 */
373function update_scroll() {
374	$('.scroll-items').each(function() {
375		var wrapper = $(this);
376		var offsetWidth = wrapper.outerWidth();
377		var scrollWidth = wrapper.get(0).scrollWidth;
378		// checks if the scroll content is bigger than the content inside - 10 is added as a little excess
379		if (scrollWidth > offsetWidth + 10) {
380			$(wrapper).closest('.scroll-wrapper').addClass('scroll-arrows-show');
381		} else {
382			$(wrapper).closest('.scroll-wrapper').removeClass('scroll-arrows-show');
383		}
384	});
385}
386
387/*
388  Parallax image movement
389*/
390
391function bannerParallax() {
392	$('.plx-section').each(function() {
393		var scrollTop = $(window).scrollTop(),
394			sectionOffset = $(this).offset().top,
395			distance = (scrollTop - sectionOffset),
396			img = $(this).find('.plx'),
397			yOffset = (distance / sectionOffset) * 100,
398			ratio = $(window).height() / sectionOffset,
399			transformY = yOffset / ratio;
400
401		transformY = Math.min(Math.max(transformY, 0), 100);
402		img.css({'transform' : 'translate(' + 0 + ',' + transformY + '%)'});
403	});
404}
405
406$(window).on('load resize scroll', function() {
407	bannerParallax();
408});
409
410/*
411  Dynamic video data source
412*/
413
414// get all vids
415var video =  document.querySelectorAll('video.dynamic-data-src')
416
417// add source to video tag
418function addSourceToVideo(element, src) {
419    var source = document.createElement('source');
420    source.src = src;
421    source.type = 'video/mp4';
422	console.log(src);
423    element.appendChild(source);
424}
425
426// determine screen size and select mobile or desktop vid
427function whichSizeVideo(element, src) {
428	var windowWidth = window.innerWidth ? window.innerWidth : $(window).width();
429	if (windowWidth > 575 ) {
430		addSourceToVideo( element, src.dataset.desktopVid);
431	} else {
432		addSourceToVideo(element, src.dataset.mobileVid);
433	}
434}
435
436// init only if page has videos
437function dynamicVideoSize() {
438	if (video !== undefined) {
439	video.forEach(function(element, index) {
440			whichSizeVideo(  
441				element, //element
442				element  //src locations
443			);	
444		});
445	}
446}
447
448dynamicVideoSize();
449
450/*
451  Print on scroll animation
452*/
453
454function initPrintAnimation() {
455	
456	// pat (print animation title)
457	// pac (print animation copy)
458	
459	var pat1 = $('.pat-1'), 
460		pac1 = $('.pac-1'),
461		pat2 = $('.pat-2'),
462		pac2 = $('.pac-2'),
463		pat3 = $('.pat-3'),
464		pat4 = $('.pat-4');
465		pat5 = $('.pat-5');
466		
467	var circle = document.querySelector('circle');
468	var radius = circle.r.baseVal.value;
469	var circumference = radius * 2 * Math.PI;
470	
471	circle.style.strokeDasharray = `${circumference} ${circumference}`;
472	circle.style.strokeDashoffset = `${circumference}`;
473	
474	function update_progress(progress) {
475		var offset = circumference - progress * circumference;
476		var percent = (progress * 90).toFixed(0);
477		circle.style.strokeDashoffset = offset;
478		$('.progress-time').text(percent);
479	}
480	
481	gsap.registerPlugin(ScrollTrigger);
482	
483	gsap.defaults({
484		ease: 'none',
485		duration: 5,
486	});
487	
488	gsap.set(pat1, { autoAlpha: 1 });
489	gsap.set('.slide-camera', { autoAlpha: 1 });
490	gsap.set('.slide-camera-01', { autoAlpha: 1 });
491	gsap.set('.slide-film', { x: '-8.5%', scale: 0.7, rotation: 180 });
492	gsap.set('.film-shine', { rotation: 10 });
493	
494	gsap.timeline({
495		scrollTrigger: {
496			trigger: '.print-anim-container',
497			pin: false,
498			start: 'top top',
499			end: 'bottom bottom',
500			scrub: true,
501		}
502	})
503	
504	// reveal "take a snap"
505	.to(pac1, { autoAlpha: 1 })
506	
507	// quickly reveal and hide camera flash
508	.to('.camera-flash', { opacity: 1, duration: 0.3 })
509	.to('.camera-flash', { opacity: 0, duration: 3 }, '>0.5')
510	
511	// hide "take" and "take a snap" together
512	.to(pat1, { autoAlpha: 0 }, '>3')
513	.to(pac1, { autoAlpha: 0 }, '<')
514	
515	// begin rotation of camera by hiding and revealing each slide in turn
516	.to('.slide-camera-01', { duration: 0, autoAlpha: 0 }, '<')
517	.to('.slide-camera-02', { duration: 0, autoAlpha: 1 }, '<')
518	
519	.to('.slide-camera-02', { duration: 0, autoAlpha: 0 }, '>.5')
520	.to('.slide-camera-03', { duration: 0, autoAlpha: 1 }, '<')
521	
522	.to('.slide-camera-03', { duration: 0, autoAlpha: 0 }, '>.4')
523	.to('.slide-camera-04', { duration: 0, autoAlpha: 1 }, '<')
524	
525	.to('.slide-camera-04', { duration: 0, autoAlpha: 0 }, '>.4')
526	.to('.slide-camera-05', { duration: 0, autoAlpha: 1 }, '<')
527	
528	.to('.slide-camera-05', { duration: 0, autoAlpha: 0 }, '>.3')
529	.to('.slide-camera-06', { duration: 0, autoAlpha: 1 }, '<')
530	
531	.to('.slide-camera-06', { duration: 0, autoAlpha: 0 }, '>.3')
532	.to('.slide-camera-07', { duration: 0, autoAlpha: 1 }, '<')
533	
534	.to('.slide-camera-07', { duration: 0, autoAlpha: 0 }, '>.3')
535	.to('.slide-camera-08', { duration: 0, autoAlpha: 1 }, '<')
536	
537	.to('.slide-camera-08', { duration: 0, autoAlpha: 0 }, '>.2')
538	.to('.slide-camera-09', { duration: 0, autoAlpha: 1 }, '<')
539	
540	.to('.slide-camera-09', { duration: 0, autoAlpha: 0 }, '>.2')
541	.to('.slide-camera-10', { duration: 0, autoAlpha: 1 }, '<')
542	
543	.to('.slide-camera-10', { duration: 0, autoAlpha: 0 }, '>.2')
544	.to('.slide-camera-11', { duration: 0, autoAlpha: 1 }, '<')
545	
546	.to('.slide-camera-11', { duration: 0, autoAlpha: 0 }, '>.2')
547	.to('.slide-camera-12', { duration: 0, autoAlpha: 1 }, '<')
548	
549	.to('.slide-camera-12', { duration: 0, autoAlpha: 0 }, '>.1')
550	.to('.slide-camera-13', { duration: 0, autoAlpha: 1 }, '<')
551	
552	.to('.slide-camera-13', { duration: 0, autoAlpha: 0 }, '>.1')
553	.to('.slide-camera-14', { duration: 0, autoAlpha: 1 }, '<')
554	
555	.to('.slide-camera-14', { duration: 0, autoAlpha: 0 }, '>.1')
556	.to('.slide-camera-15', { duration: 0, autoAlpha: 1 }, '<')
557	
558	.to('.slide-camera-15', { duration: 0, autoAlpha: 0 }, '>.1')
559	.to('.slide-camera-16', { duration: 0, autoAlpha: 1 }, '<')
560	
561	.to('.slide-camera-16', { duration: 0, autoAlpha: 0 }, '>.1')
562	.to('.slide-camera-17', { duration: 0, autoAlpha: 1 }, '<')
563	
564	.to('.slide-camera-17', { duration: 0, autoAlpha: 0 }, '>.1')
565	.to('.slide-camera-18', { duration: 0, autoAlpha: 1 }, '<')
566	
567	.to('.slide-camera-18', { duration: 0, autoAlpha: 0 }, '>.1')
568	.to('.slide-camera-19', { duration: 0, autoAlpha: 1 }, '<')
569	
570	.to('.slide-camera-19', { duration: 0, autoAlpha: 0 }, '>.1')
571	.to('.slide-camera-20', { duration: 0, autoAlpha: 1 }, '<')
572	
573	.to('.slide-camera-20', { duration: 0, autoAlpha: 0 }, '>.1')
574	.to('.slide-camera-21', { duration: 0, autoAlpha: 1 }, '<')
575	
576	.to('.slide-camera-21', { duration: 0, autoAlpha: 0 }, '>.1')
577	.to('.slide-camera-22', { duration: 0, autoAlpha: 1 }, '<')
578	
579	.to('.slide-camera-22', { duration: 0, autoAlpha: 0 }, '>.1')
580	.to('.slide-camera-23', { duration: 0, autoAlpha: 1 }, '<')
581	
582	.to('.slide-camera-23', { duration: 0, autoAlpha: 0 }, '>.2')
583	.to('.slide-camera-24', { duration: 0, autoAlpha: 1 }, '<')
584	
585	.to('.slide-camera-24', { duration: 0, autoAlpha: 0 }, '>.2')
586	.to('.slide-camera-25', { duration: 0, autoAlpha: 1 }, '<')
587	
588	.to('.slide-camera-25', { duration: 0, autoAlpha: 0 }, '>.2')
589	.to('.slide-camera-26', { duration: 0, autoAlpha: 1 }, '<')
590	
591	.to('.slide-camera-26', { duration: 0, autoAlpha: 0 }, '>.2')
592	.to('.slide-camera-27', { duration: 0, autoAlpha: 1 }, '<')
593	
594	.to('.slide-camera-27', { duration: 0, autoAlpha: 0 }, '>.3')
595	.to('.slide-camera-28', { duration: 0, autoAlpha: 1 }, '<')
596	
597	.to('.slide-camera-28', { duration: 0, autoAlpha: 0 }, '>.3')
598	.to('.slide-camera-29', { duration: 0, autoAlpha: 1 }, '<')
599	
600	// reveal "and..."
601	.to(pat2, { autoAlpha: 1 }, '>.3')
602	
603	.to('.slide-camera-29', { duration: 0, autoAlpha: 0 }, '<')
604	.to('.slide-camera-30', { duration: 0, autoAlpha: 1 }, '<')
605	
606	.to('.slide-camera-30', { duration: 0, autoAlpha: 0 }, '>.4')
607	.to('.slide-camera-31', { duration: 0, autoAlpha: 1 }, '<')
608	
609	.to('.slide-camera-31', { duration: 0, autoAlpha: 0 }, '>.4')
610	.to('.slide-camera-32', { duration: 0, autoAlpha: 1 }, '<')
611	
612	.to('.slide-camera-32', { duration: 0, autoAlpha: 0 }, '>.5')
613	.to('.slide-camera-33', { duration: 0, autoAlpha: 1 }, '<')
614	
615	// make film slides visible, ready for printing
616	.to('.slide-film', { duration: 0, autoAlpha: 1 })
617	.to('.slide-film-01', { duration: 0, autoAlpha: 1 })
618	.to('.slide-film-04', { duration: 0, autoAlpha: 1 })
619	
620	// slide the film up and the camera down
621	.to('.slide-film', { y: '-18%' })
622	.to('.slide-camera', { y: '54%' }, '<')
623	
624	// continue sliding the camera down and hidden while bringing film slide into center and full size, reveal "watch your image come to life"
625	.to('.slide-film', { duration: 10, y: '0%', x: '0%', scale: 1, rotation: 0 })
626	.to('.slide-camera', { y: '108%', autoAlpha: 0 }, '<')
627	.to(pac2, { autoAlpha: 1 }, '<5')
628	
629	// reveal progress
630	.to('.progress-wrapper', { autoAlpha: 1 })
631	
632	// start progress count
633	.to('.progress-wrapper', {
634		duration: 10,
635		onUpdate: function () {
636			update_progress(this.progress());
637		}
638	})
639	
640	// develop film, starting out slower and increasing speed
641	.to('.slide-film-02', { duration: 4, autoAlpha: 0.1 }, '<')
642	.to('.slide-film-02', { duration: 3, autoAlpha: 0.3 }, '<4')
643	.to('.slide-film-02', { duration: 2, autoAlpha: 0.6 }, '<3')
644	.to('.slide-film-02', { duration: 1, autoAlpha: 1 }, '<2')
645	
646	// reveal shine and move across image
647	.to('.slide-film-03, .film-shine', { duration: 0.5, autoAlpha: 1 }, '>3')
648	.to('.film-shine', { duration: 10, x: '300%'}, '<')
649	.to('.slide-film-03, .film-shine', { duration: 0.5, autoAlpha: 0 })
650	
651	// hide "and..", "watch your image come to life" and progress
652	.to(pat2, { autoAlpha: 0 }, '>5')
653	.to(pac2, { autoAlpha: 0 }, '<')
654	.to('.progress-wrapper', { autoAlpha: 0 }, '<')
655	
656	// reveal "give some love"
657	.to(pat3, { autoAlpha: 1 })
658	
659	// hide "give some love" and mini film
660	.to(pat3, { autoAlpha: 0 }, '>5')
661	.to('.slide-film', { autoAlpha: 0 }, '<')
662	
663	// reveal "give your take" and square film
664	.to(pat4, { autoAlpha: 1 })
665	.to('.slide-film-square', { autoAlpha: 1 }, '<')
666	
667	// hude "give your take" and square film
668	.to(pat4, { autoAlpha: 0 }, '>5')
669	.to('.slide-film-square', { autoAlpha: 0 }, '<')
670	
671	// reveal "give good vibes" and wide film
672	.to(pat5, { autoAlpha: 1 })
673	.to('.slide-film-wide', { autoAlpha: 1 }, '<')
674	
675	// add a short pause before moving on
676	.set({}, {}, "+=10")
677}
678
679function printAnimationSizes() {
680	var maxHeight = -1;
681	$('.print-anim-text-wrap').each(function() {
682		maxHeight = maxHeight > $(this).height() ? maxHeight : $(this).height();
683	});
684	$('.print-anim-text').height(maxHeight);
685	
686	// Set .print-anim-graphics width to match its height. Start by
687	// resetting .print-anim-graphics to 50%, defined in css
688	$('.print-anim-graphics').height('');
689	
690	// Check if making the width equal to the height makes
691	// .print-anim-graphics wider than the page (using .print-anim-text
692	// for reference). If so, make .print-anim-text into a square equal
693	// to the width of the page
694	var graphicsHeight = $('.print-anim-graphics').height();
695	var textWidth = $('.print-anim-text').width();
696	if( textWidth > graphicsHeight ){
697		$('.print-anim-graphics').width(graphicsHeight);
698	} else {
699		$('.print-anim-graphics').width(textWidth).height(textWidth);
700	}
701	
702	if( isPhabletWidth() ) {
703		$('.progress-wrapper').css({'margin-left': '', 'margin-top': ''});
704	} else {
705		var graphicsWidth = $('.print-anim-graphics').width();
706		$('.progress-wrapper').css({'margin-left': (graphicsWidth*0.5)+'px', 'margin-top': (maxHeight*0.5)+'px'});
707	}
708}
709
710$(document).ready(function() {
711	printAnimationSizes();
712});
713
714$(window).on('resize', function() {
715	printAnimationSizes();
716});
717
718$(document).ready(function() {
719	$('.print-anim-skip').on('click',function(e){
720		e.preventDefault();
721		var section = $(this).closest('.print-anim-container');
722		var sHeight = $(section).height();
723		$(window).scrollTop( $(section).offset().top + sHeight )
724	});
725
726	$('.print-anim-back').on('click',function(e){
727		e.preventDefault();
728		$(window).scrollTop( $('#header').offset().top )
729	});
730});

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.