PageSourceSearch

https://goldwelten.de/assets/jqyuma.js

js goldwelten.de collected 2026-10-03 00:47:56 UTC 3,362 bytes, 135 lines download raw bytes

1(function($){
2	
3	$.extend( $.easing,	{
4		easeYuma: function (x, t, b, c, d) {
5			if ((t/=d/2) < 1) return c/2*t*t*t + b;
6			return c/2*((t-=2)*t*t + 2) + b;	
7		}
8	})
9	
10	$.fn.yuma = function(options) {  
11
12		var settings = {'slidespeed':400,'dropspeed':400,'width':960,'start':0, 'autoslide':4};
13
14		return this.each(function() {
15			if (options) { 
16				$.extend( settings, options );
17			}
18			
19			var sliderContainer=$(this).find('#slidercontainer');
20			var imgCount=sliderContainer.find('.sliderpic').length;
21			var sliderLeft=$(this).find('#sliderleft');
22			var sliderRight=$(this).find('#sliderright');
23			var currentId=0;
24			var timer=null;
25			
26			sliderContainer.css('width', settings.width*imgCount+'px');
27			
28			function setSlider() {
29				sliderLeft.css('display',(currentId==0)?'none':'block');
30				sliderRight.css('display',(currentId==imgCount-1)?'none':'block');
31			}
32			
33			function scrollRight() {
34				if (currentId<imgCount-1) {
35					currentId++;
36					scrollContainer();
37				}
38				return false;
39			}
40
41			function scrollLeft() {
42				if (currentId>0) {
43					currentId--;
44					scrollContainer();
45				}
46				return false;
47			}
48
49			function advanceSlide() {
50				currentId++;
51				if (currentId>imgCount-1) {
52					currentId=0;
53				} 
54				scrollContainer();
55			}
56			
57			function scrollContainer() {
58				sliderContainer.animate({'left':-settings.width*currentId},{'duration':settings.slidespeed, 'easing':'easeYuma'});
59				setSlider();
60			}
61			
62			function setContainer() {
63				sliderContainer.css({'left':-settings.width*currentId});
64				setSlider();
65			}
66			
67			function startTimer() {
68				if (timer == null) {
69					if (settings.autoslide > 0) {
70						timer = window.setInterval(advanceSlide, settings.autoslide*1000);
71					}
72				}				
73			}
74			
75			function stopTimer() {
76				if (timer!=null) {
77					window.clearInterval(timer);
78					timer=null;
79				}
80			}
81			
82			
83			currentId=settings.start;
84			
85			setContainer();
86			setSlider();
87			
88			if (settings.menuOgg!='' & settings.menuMP3!="") {
89				$('body').append("<audio class='menuaudio' preload='auto'><source src='"+settings.menuOgg+"' type='audio/ogg' /><source src='"+settings.menuMP3+"' type='audio/mpeg' /></audio>");
90			}
91			
92			var menuAudio=$('.menuaudio');	
93			
94			$(window).load(function() {
95				startTimer();			
96				sliderRight.click(scrollRight);
97				sliderLeft.click(scrollLeft);
98				sliderRight.hover(stopTimer, startTimer);
99				sliderLeft.hover(stopTimer, startTimer);
100			})
101			
102			
103			$(this).children('ul').hover(function() {
104				if (menuAudio.length > 0) {
105					try {
106						if (!!(menuAudio.get(0).canPlayType)) {
107							menuAudio.get(0).pause();
108							menuAudio.get(0).currentTime = 0;
109							menuAudio.get(0).play();
110						}
111					}
112					catch (ex) {}
113				}
114				$(this).stop().animate({'height':'300px'},{'duration': settings.dropspeed, 'easing':'easeYuma'});
115				stopTimer();
116			}, function () {
117				$(this).stop().animate({'height':'40px'},{'duration': settings.dropspeed, 'easing':'easeYuma'});
118				startTimer();				
119			});	
120			
121			$(this).children('ul').find('li').mouseover(function() {
122				var currentIndex=$(this).index();
123				var currentParent=$(this).parent();
124				
125				currentParent.find('li').each(function() {
126					if ($(this).index()==currentIndex) {
127						$(this).addClass('sel');
128					} else {
129						$(this).removeClass('sel');
130					}
131				})
132			});
133    	});
134  	};
135})(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.