PageSourceSearch

https://camping-bertahof.at/wp-content/themes/rebel/js/jquery.functions.js?ver=7.1.2

js camping-bertahof.at collected 2026-10-08 05:20:49 UTC 20,596 bytes, 462 lines download raw bytes

vendor: 4,289 bytes, lines 1-119
1/*----------------------------------*/
2/*    Standard jQuery functions
3/*----------------------------------*/
4
5/*
6 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
7 *
8 * Uses the built in easing capabilities added In jQuery 1.1
9 * to offer multiple easing options
10 *
11 * TERMS OF USE - jQuery Easing
12 * 
13 * Open source under the BSD License. 
14 * 
15 * Copyright © 2008 George McGinley Smith
16 * All rights reserved.
17 * 
18 * Redistribution and use in source and binary forms, with or without modification, 
19 * are permitted provided that the following conditions are met:
20 * 
21 * Redistributions of source code must retain the above copyright notice, this list of 
22 * conditions and the following disclaimer.
23 * Redistributions in binary form must reproduce the above copyright notice, this list 
24 * of conditions and the following disclaimer in the documentation and/or other materials 
25 * provided with the distribution.
26 * 
27 * Neither the name of the author nor the names of contributors may be used to endorse 
28 * or promote products derived from this software without specific prior written permission.
29 * 
30 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
31 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
32 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
33 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
34 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
35 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
36 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
37 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
38 * OF THE POSSIBILITY OF SUCH DAMAGE. 
39 *
40*/
41
42// t: current time, b: begInnIng value, c: change In value, d: duration
43jQuery.easing['jswing'] = jQuery.easing['swing'];
44
45jQuery.extend( jQuery.easing,
46{
47	def: 'easeOutQuad',
48	swing: function (x, t, b, c, d) {
49		//alert(jQuery.easing.default);
50		return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
51	},
52	easeInQuad: function (x, t, b, c, d) {
53		return c*(t/=d)*t + b;
54	},
55	easeOutQuad: function (x, t, b, c, d) {
56		return -c *(t/=d)*(t-2) + b;
57	},
58	easeInOutQuad: function (x, t, b, c, d) {
59		if ((t/=d/2) < 1) return c/2*t*t + b;
60		return -c/2 * ((--t)*(t-2) - 1) + b;
61	},
62	easeInCubic: function (x, t, b, c, d) {
63		return c*(t/=d)*t*t + b;
64	},
65	easeOutCubic: function (x, t, b, c, d) {
66		return c*((t=t/d-1)*t*t + 1) + b;
67	},
68	easeInOutCubic: function (x, t, b, c, d) {
69		if ((t/=d/2) < 1) return c/2*t*t*t + b;
70		return c/2*((t-=2)*t*t + 2) + b;
71	},
72	easeInQuart: function (x, t, b, c, d) {
73		return c*(t/=d)*t*t*t + b;
74	},
75	easeOutQuart: function (x, t, b, c, d) {
76		return -c * ((t=t/d-1)*t*t*t - 1) + b;
77	},
78	easeInOutQuart: function (x, t, b, c, d) {
79		if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
80		return -c/2 * ((t-=2)*t*t*t - 2) + b;
81	},
82	easeInQuint: function (x, t, b, c, d) {
83		return c*(t/=d)*t*t*t*t + b;
84	},
85	easeOutQuint: function (x, t, b, c, d) {
86		return c*((t=t/d-1)*t*t*t*t + 1) + b;
87	},
88	easeInOutQuint: function (x, t, b, c, d) {
89		if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
90		return c/2*((t-=2)*t*t*t*t + 2) + b;
91	},
92	easeInSine: function (x, t, b, c, d) {
93		return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
94	},
95	easeOutSine: function (x, t, b, c, d) {
96		return c * Math.sin(t/d * (Math.PI/2)) + b;
97	},
98	easeInOutSine: function (x, t, b, c, d) {
99		return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
100	},
101	easeInExpo: function (x, t, b, c, d) {
102		return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
103	},
104	easeOutExpo: function (x, t, b, c, d) {
105		return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
106	},
107	easeInOutExpo: function (x, t, b, c, d) {
108		if (t==0) return b;
109		if (t==d) return b+c;
110		if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
111		return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
112	},
113	easeInCirc: function (x, t, b, c, d) {
114		return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
115	},
116	easeOutCirc: function (x, t, b, c, d) {
117		return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
118	},
119	easeInOutCirc: function (x, t, b, c, d) {
120		if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
121		return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
122	},
123	easeInElastic: function (x, t, b, c, d) {
124		var s=1.70158;var p=0;var a=c;
125		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
126		if (a < Math.abs(c)) { a=c; var s=p/4; }
127		else var s = p/(2*Math.PI) * Math.asin (c/a);
128		return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
129	},
130	easeOutElastic: function (x, t, b, c, d) {
131		var s=1.70158;var p=0;var a=c;
132		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
133		if (a < Math.abs(c)) { a=c; var s=p/4; }
134		else var s = p/(2*Math.PI) * Math.asin (c/a);
135		return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
136	},
137	easeInOutElastic: function (x, t, b, c, d) {
138		var s=1.70158;var p=0;var a=c;
139		if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
140		if (a < Math.abs(c)) { a=c; var s=p/4; }
141		else var s = p/(2*Math.PI) * Math.asin (c/a);
142		if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
143		return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
144	},
145	easeInBack: function (x, t, b, c, d, s) {
146		if (s == undefined) s = 1.70158;
147		return c*(t/=d)*t*((s+1)*t - s) + b;
148	},
149	easeOutBack: function (x, t, b, c, d, s) {
150		if (s == undefined) s = 1.70158;
151		return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
152	},
153	easeInOutBack: function (x, t, b, c, d, s) {
154		if (s == undefined) s = 1.70158; 
155		if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
156		return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
157	},
158	easeInBounce: function (x, t, b, c, d) {
159		return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
160	},
161	easeOutBounce: function (x, t, b, c, d) {
162		if ((t/=d) < (1/2.75)) {
163			return c*(7.5625*t*t) + b;
164		} else if (t < (2/2.75)) {
165			return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
166		} else if (t < (2.5/2.75)) {
167			return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
168		} else {
169			return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
170		}
171	},
172	easeInOutBounce: function (x, t, b, c, d) {
173		if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
174		return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
175	}
176});
177
178/*
179 *
180 * TERMS OF USE - EASING EQUATIONS
181 * 
182 * Open source under the BSD License. 
183 * 
184 * Copyright © 2001 Robert Penner
185 * All rights reserved.
186 * 
187 * Redistribution and use in source and binary forms, with or without modification, 
188 * are permitted provided that the following conditions are met:
189 * 
190 * Redistributions of source code must retain the above copyright notice, this list of 
191 * conditions and the following disclaimer.
192 * Redistributions in binary form must reproduce the above copyright notice, this list 
193 * of conditions and the following disclaimer in the documentation and/or other materials 
194 * provided with the distribution.
195 * 
196 * Neither the name of the author nor the names of contributors may be used to endorse 
197 * or promote products derived from this software without specific prior written permission.
198 * 
199 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
200 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
201 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
202 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
203 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
204 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
205 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
206 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
207 * OF THE POSSIBILITY OF SUCH DAMAGE. 
208 *
209 */
210
211/*global jQuery */
212/*jshint multistr:true browser:true */
213/*!
214* FitVids 1.0.3
215*
216* Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
217* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
218* Released under the WTFPL license - http://sam.zoy.org/wtfpl/
219*
220* Date: Thu Sept 01 18:00:00 2011 -0500
221*/
222
223(function( $ ){
224
225  "use strict";
226
227  $.fn.fitVids = function( options ) {
228    var settings = {
229      customSelector: null
230    };
231
232    if(!document.getElementById('fit-vids-style')) {
233
234      var div = document.createElement('div'),
235          ref = document.getElementsByTagName('base')[0] || document.getElementsByTagName('script')[0],
236          cssStyles = '&shy;<style>.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}</style>';
237
238      div.className = 'fit-vids-style';
239      div.id = 'fit-vids-style';
240      div.style.display = 'none';
241      div.innerHTML = cssStyles;
242
243      ref.parentNode.insertBefore(div,ref);
244
245    }
246
247    if ( options ) {
248      $.extend( settings, options );
249    }
250
251    return this.each(function(){
252      var selectors = [
253        "iframe[src*='player.vimeo.com']",
254        "iframe[src*='youtube.com']",
255        "iframe[src*='youtube-nocookie.com']",
256        "iframe[src*='kickstarter.com'][src*='video.html']",
257        "object",
258        "embed"
259      ];
260
261      if (settings.customSelector) {
262        selectors.push(settings.customSelector);
263      }
264
265      var $allVideos = $(this).find(selectors.join(','));
266      $allVideos = $allVideos.not("object object"); // SwfObj conflict patch
267
268      $allVideos.each(function(){
269        var $this = $(this);
270        if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; }
271        var height = ( this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10))) ) ? parseInt($this.attr('height'), 10) : $this.height(),
272            width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(),
273            aspectRatio = height / width;
274        if(!$this.attr('id')){
275          var videoID = 'fitvid' + Math.floor(Math.random()*999999);
276          $this.attr('id', videoID);
277        }
278        $this.wrap('<div class="fluid-width-video-wrapper"></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+"%");
279        $this.removeAttr('height').removeAttr('width');
280      });
281    });
282  };
283// Works with either jQuery or Zepto
284})( window.jQuery || window.Zepto );
285
286/**!
287 * easyPieChart
288 * Lightweight plugin to render simple, animated and retina optimized pie charts
289 *
290 * @license 
291 * @author Robert Fleischmann <[email protected]> (http://robert-fleischmann.de)
292 * @version 2.1.4
293 **/
294!function(a,b){"object"==typeof exports?module.exports=b(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],b):b(a.jQuery)}(this,function(a){var b=function(a,b){var c,d=document.createElement("canvas");a.appendChild(d),"undefined"!=typeof G_vmlCanvasManager&&G_vmlCanvasManager.initElement(d);var e=d.getContext("2d");d.width=d.height=b.size;var f=1;window.devicePixelRatio>1&&(f=window.devicePixelRatio,d.style.width=d.style.height=[b.size,"px"].join(""),d.width=d.height=b.size*f,e.scale(f,f)),e.translate(b.size/2,b.size/2),e.rotate((-0.5+b.rotate/180)*Math.PI);var g=(b.size-b.lineWidth)/2;b.scaleColor&&b.scaleLength&&(g-=b.scaleLength+2),Date.now=Date.now||function(){return+new Date};var h=function(a,b,c){c=Math.min(Math.max(-1,c||0),1);var d=0>=c?!0:!1;e.beginPath(),e.arc(0,0,g,0,2*Math.PI*c,d),e.strokeStyle=a,e.lineWidth=b,e.stroke()},i=function(){var a,c;e.lineWidth=1,e.fillStyle=b.scaleColor,e.save();for(var d=24;d>0;--d)d%6===0?(c=b.scaleLength,a=0):(c=.6*b.scaleLength,a=b.scaleLength-c),e.fillRect(-b.size/2+a,0,c,1),e.rotate(Math.PI/12);
294e.restore()},j=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(a){window.setTimeout(a,1e3/60)}}(),k=function(){b.scaleColor&&i(),b.trackColor&&h(b.trackColor,b.lineWidth,1)};this.getCanvas=function(){return d},this.getCtx=function(){return e},this.clear=function(){e.clearRect(b.size/-2,b.size/-2,b.size,b.size)},this.draw=function(a){b.scaleColor||b.trackColor?e.getImageData&&e.putImageData?c?e.putImageData(c,0,0):(k(),c=e.getImageData(0,0,b.size*f,b.size*f)):(this.clear(),k()):this.clear(),e.lineCap=b.lineCap;var d;d="function"==typeof b.barColor?b.barColor(a):b.barColor,h(d,b.lineWidth,a/100)}.bind(this),this.animate=function(a,c){var d=Date.now();b.onStart(a,c);var e=function(){var f=Math.min(Date.now()-d,b.animate.duration),g=b.easing(this,f,a,c-a,b.animate.duration);this.draw(g),b.onStep(a,c,g),f>=b.animate.duration?b.onStop(a,c):j(e)}.bind(this);j(e)}.bind(this)},c=function(a,c){var d={barColor:"#ef1e25",trackColor:"#f9f9f9",scaleColor:"#dfe0e0",scaleLength:5,lineCap:"round",lineWidth:3,size:110,rotate:0,animate:{duration:1e3,enabled:!0},easing:function(a,b,c,d,e){return b/=e/2,1>b?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},onStart:function(){},onStep:function(){},onStop:function(){}};if("undefined"!=typeof b)d.renderer=b;else{if("undefined"==typeof SVGRenderer)throw new Error("Please load either the SVG- or the CanvasRenderer");d.renderer=SVGRenderer}var e={},f=0,g=function(){this.el=a,this.options=e;for(var b in d)d.hasOwnProperty(b)&&(e[b]=c&&"undefined"!=typeof c[b]?c[b]:d[b],"function"==typeof e[b]&&(e[b]=e[b].bind(this)));e.easing="string"==typeof e.easing&&"undefined"!=typeof jQuery&&jQuery.isFunction(jQuery.easing[e.easing])?jQuery.easing[e.easing]:d.easing,"number"==typeof e.animate&&(e.animate={duration:e.animate,enabled:!0}),"boolean"!=typeof e.animate||e.animate||(e.animate={duration:1e3,enabled:e.animate}),this.renderer=new e.renderer(a,e),this.renderer.draw(f),a.dataset&&a.dataset.percent?this.update(parseFloat(a.dataset.percent)):a.getAttribute&&a.getAttribute("data-percent")&&this.update(parseFloat(a.getAttribute("data-percent")))}.bind(this);this.update=function(a){return a=parseFloat(a),e.animate.enabled?this.renderer.animate(f,a):this.renderer.draw(a),f=a,this}.bind(this),this.disableAnimation=function(){return e.animate.enabled=!1,this},this.enableAnimation=function(){return e.animate.enabled=!0,this},g()};a.fn.easyPieChart=function(b){return this.each(function(){var d;a.data(this,"easyPieChart")||(d=a.extend({},b,a(this).data()),a.data(this,"easyPieChart",new c(this,d)))})}});
295
296/**!
297 * countTo plugin
298 **/
299(function ($) {
300	$.fn.countTo = function (options) {
301		options = options || {};
302
303		return $(this).each(function () {
304			// set options for current element
305			var settings = $.extend({}, $.fn.countTo.defaults, {
306				from:            $(this).data('from'),
307				to:              $(this).data('to'),
308				speed:           $(this).data('speed'),
309				refreshInterval: $(this).data('refresh-interval'),
310				decimals:        $(this).data('decimals')
311			}, options);
312
313			// how many times to update the value, and how much to increment the value on each update
314			var loops = Math.ceil(settings.speed / settings.refreshInterval),
315				increment = (settings.to - settings.from) / loops;
316
317			// references & variables that will change with each update
318			var self = this,
319				$self = $(this),
320				loopCount = 0,
321				value = settings.from,
322				data = $self.data('countTo') || {};
323
324			$self.data('countTo', data);
325
326			// if an existing interval can be found, clear it first
327			if (data.interval) {
328				clearInterval(data.interval);
329			}
330			data.interval = setInterval(updateTimer, settings.refreshInterval);
331
332			// initialize the element with the starting value
333			render(value);
334
335			function updateTimer() {
336				value += increment;
337				loopCount++;
338
339				render(value);
340
341				if (typeof(settings.onUpdate) == 'function') {
342					settings.onUpdate.call(self, value);
343				}
344
345				if (loopCount >= loops) {
346					// remove the interval
347					$self.removeData('countTo');
348					clearInterval(data.interval);
349					value = settings.to;
350
351					if (typeof(settings.onComplete) == 'function') {
352						settings.onComplete.call(self, value);
353					}
354				}
355			}
356
357			function render(value) {
358				var formattedValue = settings.formatter.call(self, value, settings);
359				$self.text(formattedValue);
360			}
361		});
362	};
363
364	$.fn.countTo.defaults = {
365		from: 0,               // the number the element should start at
366		to: 0,                 // the number the element should end at
367		speed: 1000,           // how long it should take to count between the target numbers
368		refreshInterval: 100,  // how often the element should be updated
369		decimals: 0,           // the number of decimal places to show
370		formatter: formatter,  // handler for formatting the value before rendering
371		onUpdate: null,        // callback method for every time the element is updated
372		onComplete: null       // callback method for when the element finishes updating
373	};
374
375	function formatter(value, settings) {
376		return value.toFixed(settings.decimals);
377	}
378}(jQuery));
379
380/*
381*
382*
383*   UItoTop jQuery Plugin 1.2
384*   Matt Varone
385*   http://www.mattvarone.com/web-design/uitotop-jquery-plugin
386*
387*
388*/
389(function($){$.fn.UItoTop=function(options){var defaults={text:'<span><i class="fa fa-angle-up"></i></span>',min:200,inDelay:600,outDelay:400,containerID:'toTop',containerHoverID:'toTopHover',scrollSpeed:1200,easingType:'linear'},settings=$.extend(defaults,options),containerIDhash='#'+settings.containerID,containerHoverIDHash='#'+settings.containerHoverID;$('body').append('<a href="#" id="'+settings.containerID+'">'+settings.text+'</a>');$(containerIDhash).hide().on('click.UItoTop',function(){$('html, body').animate({scrollTop:0},settings.scrollSpeed,settings.easingType);$('#'+settings.containerHoverID,this).stop().animate({'opacity':0},settings.inDelay,settings.easingType);return false;}).prepend('<span id="'+settings.containerHoverID+'"></span>').hover(function(){$(containerHoverIDHash,this).stop().animate({'opacity':1},600,'linear');},function(){$(containerHoverIDHash,this).stop().animate({'opacity':0},700,'linear');});$(window).scroll(function(){var sd=$(window).scrollTop();if(typeof document.body.style.maxHeight==="undefined"){$(containerIDhash).css({'position':'absolute','top':sd+$(window).height()-50});}
390if(sd>settings.min)
391$(containerIDhash).fadeIn(settings.inDelay);else
392$(containerIDhash).fadeOut(settings.Outdelay);});};})(jQuery);
393
394/*
395Plugin: jQuery Parallax
396Version 1.1.3
397Author: Ian Lunn
398Twitter: @IanLunn
399Author URL: http://www.ianlunn.co.uk/
400Plugin URL: http://www.ianlunn.co.uk/plugins/jquery-parallax/
401
402Dual licensed under the MIT and GPL licenses:
403http://www.opensource.org/licenses/mit-license.php
404http://www.gnu.org/licenses/gpl.html
405*/
406
407(function( $ ){
408	var $window = $(window);
409	var windowHeight = $window.height();
410
411	$window.resize(function () {
412		windowHeight = $window.height();
413	});
414
415	$.fn.parallax = function(xpos, speedFactor, outerHeight) {
416		var $this = $(this);
417		var getHeight;
418		var firstTop;
419		var paddingTop = 0;
420		
421		//get the starting position of each element to have parallax applied to it		
422		$this.each(function(){
423		    firstTop = $this.offset().top;
424		});
425
426		if (outerHeight) {
427			getHeight = function(jqo) {
428				return jqo.outerHeight(true);
429			};
430		} else {
431			getHeight = function(jqo) {
432				return jqo.height();
433			};
434		}
435			
436		// setup defaults if arguments aren't specified
437		if (arguments.length < 1 || xpos === null) xpos = "50%";
438		if (arguments.length < 2 || speedFactor === null) speedFactor = 0.1;
439		if (arguments.length < 3 || outerHeight === null) outerHeight = true;
440		
441		// function to be called whenever the window is scrolled or resized
442		function update(){
443			var pos = $window.scrollTop();				
444
445			$this.each(function(){
446				var $element = $(this);
447				var top = $element.offset().top;
448				var height = getHeight($element);
449
450				// Check if totally above or totally below viewport
451				if (top + height < pos || top > pos + windowHeight) {
452					return;
453				}
454
455				$this.css('backgroundPosition', xpos + " " + Math.round((firstTop - pos) * speedFactor) + "px");
456			});
457		}		
458
459		$window.bind('scroll', update).resize(update);
460		update();
461	};
462})(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.