PageSourceSearch

https://sspeterandpaulplains.com/portals/sspeterandpaulplains/Skins/Skin/js/jquery.plugins.js

js sspeterandpaulplains.com collected 2026-09-27 08:38:58 UTC 6,790 bytes, 171 lines download raw bytes

1/**
2   * Copyright 2012, Digital Fusion
3   * Licensed under the MIT license.
4   * http://teamdf.com/jquery-plugins/license/
5   *
6   * @author Sam Sehnert
7   * @desc A small plugin that checks whether elements are within
8   *     the user visible viewport of a web browser.
9   *     only accounts for vertical position, not horizontal.
10*/
11(function($) {
12   $.fn.visible = function(partial) {
13
14   	var $t            = $(this),
15   	$w            = $(window),
16   	viewTop       = $w.scrollTop(),
17   	viewBottom    = viewTop + $w.height(),
18   	_top          = $t.offset().top,
19   	_bottom       = _top + $t.height(),
20   	compareTop    = partial === true ? _bottom : _top,
21   	compareBottom = partial === true ? _top : _bottom;
22
23   	if($t.hasClass('visible')){
24   		return false;
25   	}
26
27   	return ((compareBottom <= viewBottom) && (compareTop >= viewTop));
28
29   };
30
31   var addAnimation = function(element){
32   	$(element).each(function(i, el){
33   		var el = $(el);
34   		if (el.visible(true)) {
35   			el.removeClass('visible').addClass('animated'); 
36   		} 
37   	});
38   }
39
40   var checkVisible = function(element){
41   	$(element).each(function(i, el) {
42   		var el = $(el);
43         if (el.visible(false)) {
44   			el.addClass("visible"); 
45   		} 
46   	});   	
47   }
48
49   $(window).load(function(){
50   	checkVisible('.animation');
51   });
52
53   $(window).scroll(function(event) {
54	  addAnimation('.animation');
55    });
56
57})(jQuery);
58
59
60/**
61 * LavaLamp - A menu plugin for jQuery with cool hover effects.
62 * @requires jQuery v1.1.3.1 or above
63 *
64 * http://gmarwaha.com/blog/?p=7
65 *
66 * Copyright (c) 2007 Ganeshji Marwaha (gmarwaha.com)
67 * Dual licensed under the MIT and GPL licenses:
68 * http://www.opensource.org/licenses/mit-license.php
69 * http://www.gnu.org/licenses/gpl.html
70 *
71 * Version: 0.1.0
72 */
73(function($) {
74    $.fn.lavaLamp = function(o) {
75        o = $.extend({ fx: "linear", speed: 500, click: function(){} }, o || {});
76
77        return this.each(function(index) {
78            
79            var me = $(this), noop = function(){},
80                $back = $('<li class="lampback"><div class="lampleft"><div class="lampcenter"></div></div></li>').appendTo(me),
81                $li = $(">li", this), curr = $("li.breadcrumb", this)[0] || $($li[0]).addClass("breadcrumb")[0];
82
83            $li.not(".lampback").hover(function() {
84                move(this);
85            }, noop);
86
87            $(this).hover(noop, function() {
88                move(curr);
89            });
90
91            $li.click(function(e) {
92                setCurr(this);
93                return o.click.apply(this, [e, this]);
94            });
95
96            setCurr(curr);
97
98            function setCurr(el) {
99                $back.css({ "left": el.offsetLeft+"px", "width": el.offsetWidth+"px" });
100                curr = el;
101            };
102            
103            function move(el) {
104                $back.each(function() {
105                    $.dequeue(this, "fx"); }
106                ).animate({
107                    width: el.offsetWidth,
108                    left: el.offsetLeft
109                }, o.speed, o.fx);
110            };
111
112            if (index == 0){
113                $(window).resize(function(){
114                    $back.css({
115                        width: curr.offsetWidth,
116                        left: curr.offsetLeft
117                    });
118                });
119            }
120            
121        });
122    };
123})(jQuery);
124
125
126/**
127 * Copyright (c) 2007-2013 Ariel Flesler - aflesler<a>gmail<d>com | http://flesler.blogspot.com
128 * Dual licensed under MIT and GPL.
129 * @author Ariel Flesler
130 * @version 1.4.6
131 */
132;(function($){var h=$.scrollTo=function(a,b,c){$(window).scrollTo(a,b,c)};h.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1,limit:true};h.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return/webkit/i.test(navigator.userAgent)||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(e,f,g){if(typeof f=='object'){g=f;f=0}if(typeof g=='function')g={onAfter:g};if(e=='max')e=9e9;g=$.extend({},h.defaults,g);f=f||g.duration;g.queue=g.queue&&g.axis.length>1;if(g.queue)f/=2;g.offset=both(g.offset);g.over=both(g.over);return this._scrollable().each(function(){if(e==null)return;var d=this,$elem=$(d),targ=e,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=$(targ,this);if(!targ.length)return;case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}$.each(g.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=h.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(g.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=g.offset[pos]||0;if(g.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*g.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(g.limit&&/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&g.queue){if(old!=attr[key])animate(g.onAfterFirst);delete attr[key]}});animate(g.onAfter);function animate(a){$elem.animate(attr,f,g.easing,a&&function(){a.call(this,targ,g)})}}).end()};h.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);
133
134//scroll top
135jQuery.fn.topLink = function(settings) {
136		settings = jQuery.extend({
137			min: 1,
138			fadeSpeed: 200,
139			ieOffset: 50
140		}, settings);
141		return this.each(function() {
142			var el = $(this);
143			el.css('display','none'); 
144			$(window).scroll(function() {
145				if(!jQuery.support.hrefNormalized) {
146					el.css({
147						'position': 'absolute',
148						'top': $(window).scrollTop() + $(window).height() - settings.ieOffset
149					});
150				}
151				if($(window).scrollTop() >= settings.min)
152				{
153					el.fadeIn(settings.fadeSpeed);
154				}
155				else
156				{
157					el.fadeOut(settings.fadeSpeed);
158				}
159			});
160		});
161};
162jQuery(document).ready(function() {
163		$('#top-link').topLink({
164			min: 300,
165			fadeSpeed: 500
166		});
167		$('#top-link').click(function(e) {
168			e.preventDefault();
169			$.scrollTo(0,300);
170		});
171});

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.