PageSourceSearch

https://www.clydebankprogrammesonline.co.uk/sites/default/files/js…XLo34USiq8PtMKiVnfDLu_rqDWpwdN9QYih1qm2w.js

js clydebankprogrammesonline.co.uk collected 2026-10-06 13:14:40 UTC 63,093 bytes, 1,540 lines download raw bytes

1/*!
2 * Modernizr JavaScript library 1.5
3 * https://www.modernizr.com/
4 *
5 * Copyright (c) 2009-2010 Faruk Ates - https://farukat.es/
6 * Dual-licensed under the BSD and MIT licenses.
7 * https://www.modernizr.com/license/
8 *
9 * Featuring major contributions by
10 * Paul Irish  - https://paulirish.com
11 */
12 window.Modernizr=function(i,e,I){function C(a,b){for(var c in a)if(m[a[c]]!==I&&(!b||b(a[c],D)))return true}function r(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1);return!!C([a,"Webkit"+c,"Moz"+c,"O"+c,"ms"+c,"Khtml"+c],b)}function P(){j[E]=function(a){for(var b=0,c=a.length;b<c;b++)J[a[b]]=!!(a[b]in n);return J}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" "));j[Q]=function(a){for(var b=0,c,h=a.length;b<h;b++){n.setAttribute("type",a[b]);if(c=n.type!==
13 "text"){n.value=K;/tel|search/.test(n.type)||(c=/url|email/.test(n.type)?n.checkValidity&&n.checkValidity()===false:n.value!=K)}L[a[b]]=!!c}return L}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var j={},s=e.documentElement,D=e.createElement("modernizr"),m=D.style,n=e.createElement("input"),E="input",Q=E+"types",K=":)",M=Object.prototype.toString,y=" -o- -moz- -ms- -webkit- -khtml- ".split(" "),d={},L={},J={},N=[],u=function(){var a={select:"input",
14 change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"},b={};return function(c,h){var t=arguments.length==1;if(t&&b[c])return b[c];h=h||document.createElement(a[c]||"div");c="on"+c;var g=c in h;if(!g&&h.setAttribute){h.setAttribute(c,"return;");g=typeof h[c]=="function"}h=null;return t?(b[c]=g):g}}(),F={}.hasOwnProperty,O;O=typeof F!=="undefined"&&typeof F.call!=="undefined"?function(a,b){return F.call(a,b)}:function(a,b){return b in a&&typeof a.constructor.prototype[b]==="undefined"};
15 d.canvas=function(){return!!e.createElement("canvas").getContext};d.canvastext=function(){return!!(d.canvas()&&typeof e.createElement("canvas").getContext("2d").fillText=="function")};d.geolocation=function(){return!!navigator.geolocation};d.crosswindowmessaging=function(){return!!i.postMessage};d.websqldatabase=function(){var a=!!i.openDatabase;if(a)try{a=!!openDatabase("testdb","1.0","html5 test db",2E5)}catch(b){a=false}return a};d.indexedDB=function(){return!!i.indexedDB};d.hashchange=function(){return u("hashchange",
16 i)&&(document.documentMode===I||document.documentMode>7)};d.historymanagement=function(){return!!(i.history&&history.pushState)};d.draganddrop=function(){return u("drag")&&u("dragstart")&&u("dragenter")&&u("dragover")&&u("dragleave")&&u("dragend")&&u("drop")};d.websockets=function(){return"WebSocket"in i};d.rgba=function(){m.cssText="background-color:rgba(150,255,150,.5)";return(""+m.backgroundColor).indexOf("rgba")!==-1};d.hsla=function(){m.cssText="background-color:hsla(120,40%,100%,.5)";return(""+
17 m.backgroundColor).indexOf("rgba")!==-1};d.multiplebgs=function(){m.cssText="background:url(//:),url(//:),red url(//:)";return/(url\s*\(.*?){3}/.test(m.background)};d.backgroundsize=function(){return r("backgroundSize")};d.borderimage=function(){return r("borderImage")};d.borderradius=function(){return r("borderRadius","",function(a){return(""+a).indexOf("orderRadius")!==-1})};d.boxshadow=function(){return r("boxShadow")};d.opacity=function(){var a=y.join("opacity:.5;")+"";m.cssText=a;return(""+m.opacity).indexOf("0.5")!==
18 -1};d.cssanimations=function(){return r("animationName")};d.csscolumns=function(){return r("columnCount")};d.cssgradients=function(){var a=("background-image:"+y.join("gradient(linear,left top,right bottom,from(#9f9),to(white));background-image:")+y.join("linear-gradient(left top,#9f9, white);background-image:")).slice(0,-17);m.cssText=a;return(""+m.backgroundImage).indexOf("gradient")!==-1};d.cssreflections=function(){return r("boxReflect")};d.csstransforms=function(){return!!C(["transformProperty",
19 "WebkitTransform","MozTransform","OTransform","msTransform"])};d.csstransforms3d=function(){var a=!!C(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);if(a){var b=document.createElement("style"),c=e.createElement("div");b.textContent="@media ("+y.join("transform-3d),(")+"modernizr){#modernizr{height:3px}}";e.getElementsByTagName("head")[0].appendChild(b);c.id="modernizr";s.appendChild(c);a=c.offsetHeight===3;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}return a};
20 d.csstransitions=function(){return r("transitionProperty")};d.fontface=function(){var a;if(/*@cc_on@if(@_jscript_version>=5)!@end@*/0)a=true;else{var b=e.createElement("style"),c=e.createElement("span"),h,t=false,g=e.body,o,w;b.textContent="@font-face{font-family:testfont;src:url('data:font/ttf;base64,AAEAAAAMAIAAAwBAT1MvMliohmwAAADMAAAAVmNtYXCp5qrBAAABJAAAANhjdnQgACICiAAAAfwAAAAEZ2FzcP//AAMAAAIAAAAACGdseWYv5OZoAAACCAAAANxoZWFk69bnvwAAAuQAAAA2aGhlYQUJAt8AAAMcAAAAJGhtdHgGDgC4AAADQAAAABRsb2NhAIQAwgAAA1QAAAAMbWF4cABVANgAAANgAAAAIG5hbWUgXduAAAADgAAABPVwb3N03NkzmgAACHgAAAA4AAECBAEsAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAACAAMDAAAAAAAAgAACbwAAAAoAAAAAAAAAAFBmRWQAAAAgqS8DM/8zAFwDMwDNAAAABQAAAAAAAAAAAAMAAAADAAAAHAABAAAAAABGAAMAAQAAAK4ABAAqAAAABgAEAAEAAgAuqQD//wAAAC6pAP///9ZXAwAAAAAAAAACAAAABgBoAAAAAAAvAAEAAAAAAAAAAAAAAAAAAAABAAIAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEACoAAAAGAAQAAQACAC6pAP//AAAALqkA////1lcDAAAAAAAAAAIAAAAiAogAAAAB//8AAgACACIAAAEyAqoAAwAHAC6xAQAvPLIHBADtMrEGBdw8sgMCAO0yALEDAC88sgUEAO0ysgcGAfw8sgECAO0yMxEhESczESMiARDuzMwCqv1WIgJmAAACAFUAAAIRAc0ADwAfAAATFRQWOwEyNj0BNCYrASIGARQGKwEiJj0BNDY7ATIWFX8aIvAiGhoi8CIaAZIoN/43KCg3/jcoAWD0JB4eJPQkHh7++EY2NkbVRjY2RgAAAAABAEH/+QCdAEEACQAANjQ2MzIWFAYjIkEeEA8fHw8QDxwWFhwWAAAAAQAAAAIAAIuYbWpfDzz1AAsEAAAAAADFn9IuAAAAAMWf0i797/8zA4gDMwAAAAgAAgAAAAAAAAABAAADM/8zAFwDx/3v/98DiAABAAAAAAAAAAAAAAAAAAAABQF2ACIAAAAAAVUAAAJmAFUA3QBBAAAAKgAqACoAWgBuAAEAAAAFAFAABwBUAAQAAgAAAAEAAQAAAEAALgADAAMAAAAQAMYAAQAAAAAAAACLAAAAAQAAAAAAAQAhAIsAAQAAAAAAAgAFAKwAAQAAAAAAAwBDALEAAQAAAAAABAAnAPQAAQAAAAAABQAKARsAAQAAAAAABgAmASUAAQAAAAAADgAaAUsAAwABBAkAAAEWAWUAAwABBAkAAQBCAnsAAwABBAkAAgAKAr0AAwABBAkAAwCGAscAAwABBAkABABOA00AAwABBAkABQAUA5sAAwABBAkABgBMA68AAwABBAkADgA0A/tDb3B5cmlnaHQgMjAwOSBieSBEYW5pZWwgSm9obnNvbi4gIFJlbGVhc2VkIHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgT3BlbiBGb250IExpY2Vuc2UuIEtheWFoIExpIGdseXBocyBhcmUgcmVsZWFzZWQgdW5kZXIgdGhlIEdQTCB2ZXJzaW9uIDMuYmFlYzJhOTJiZmZlNTAzMiAtIHN1YnNldCBvZiBKdXJhTGlnaHRiYWVjMmE5MmJmZmU1MDMyIC0gc3Vic2V0IG9mIEZvbnRGb3JnZSAyLjAgOiBKdXJhIExpZ2h0IDogMjMtMS0yMDA5YmFlYzJhOTJiZmZlNTAzMiAtIHN1YnNldCBvZiBKdXJhIExpZ2h0VmVyc2lvbiA
20yIGJhZWMyYTkyYmZmZTUwMzIgLSBzdWJzZXQgb2YgSnVyYUxpZ2h0aHR0cDovL3NjcmlwdHMuc2lsLm9yZy9PRkwAQwBvAHAAeQByAGkAZwBoAHQAIAAyADAAMAA5ACAAYgB5ACAARABhAG4AaQBlAGwAIABKAG8AaABuAHMAbwBuAC4AIAAgAFIAZQBsAGUAYQBzAGUAZAAgAHUAbgBkAGUAcgAgAHQAaABlACAAdABlAHIAbQBzACAAbwBmACAAdABoAGUAIABPAHAAZQBuACAARgBvAG4AdAAgAEwAaQBjAGUAbgBzAGUALgAgAEsAYQB5AGEAaAAgAEwAaQAgAGcAbAB5AHAAaABzACAAYQByAGUAIAByAGUAbABlAGEAcwBlAGQAIAB1AG4AZABlAHIAIAB0AGgAZQAgAEcAUABMACAAdgBlAHIAcwBpAG8AbgAgADMALgBiAGEAZQBjADIAYQA5ADIAYgBmAGYAZQA1ADAAMwAyACAALQAgAHMAdQBiAHMAZQB0ACAAbwBmACAASgB1AHIAYQBMAGkAZwBoAHQAYgBhAGUAYwAyAGEAOQAyAGIAZgBmAGUANQAwADMAMgAgAC0AIABzAHUAYgBzAGUAdAAgAG8AZgAgAEYAbwBuAHQARgBvAHIAZwBlACAAMgAuADAAIAA6ACAASgB1AHIAYQAgAEwAaQBnAGgAdAAgADoAIAAyADMALQAxAC0AMgAwADAAOQBiAGEAZQBjADIAYQA5ADIAYgBmAGYAZQA1ADAAMwAyACAALQAgAHMAdQBiAHMAZQB0ACAAbwBmACAASgB1AHIAYQAgAEwAaQBnAGgAdABWAGUAcgBzAGkAbwBuACAAMgAgAGIAYQBlAGMAMgBhADkAMgBiAGYAZgBlADUAMAAzADIAIAAtACAAcwB1AGIAcwBlAHQAIABvAGYAIABKAHUAcgBhAEwAaQBnAGgAdABoAHQAdABwADoALwAvAHMAYwByAGkAcAB0AHMALgBzAGkAbAAuAG8AcgBnAC8ATwBGAEwAAAAAAgAAAAAAAP+BADMAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAQACAQIAEQt6ZXJva2F5YWhsaQ==')}";
21 e.getElementsByTagName("head")[0].appendChild(b);c.setAttribute("style","font:99px _,arial,helvetica;position:absolute;visibility:hidden");if(!g){g=s.appendChild(e.createElement("fontface"));t=true}c.innerHTML="........";c.id="fonttest";g.appendChild(c);h=c.offsetWidth*c.offsetHeight;c.style.font="99px testfont,_,arial,helvetica";a=h!==c.offsetWidth*c.offsetHeight;var v=function(){if(g.parentNode){a=j.fontface=h!==c.offsetWidth*c.offsetHeight;s.className=s.className.replace(/(no-)?fontface\b/,"")+
22 (a?" ":" no-")+"fontface"}};setTimeout(v,75);setTimeout(v,150);addEventListener("load",function(){v();(w=true)&&o&&o(a);setTimeout(function(){t||(g=c);g.parentNode.removeChild(g);b.parentNode.removeChild(b)},50)},false)}j._fontfaceready=function(p){w||a?p(a):(o=p)};return a||h!==c.offsetWidth};d.video=function(){var a=e.createElement("video"),b=!!a.canPlayType;if(b){b=new Boolean(b);b.ogg=a.canPlayType('video/ogg; codecs="theora"');b.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"');b.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}return b};
23 d.audio=function(){var a=e.createElement("audio"),b=!!a.canPlayType;if(b){b=new Boolean(b);b.ogg=a.canPlayType('audio/ogg; codecs="vorbis"');b.mp3=a.canPlayType("audio/mpeg;");b.wav=a.canPlayType('audio/wav; codecs="1"');b.m4a=a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")}return b};d.localStorage=function(){return"localStorage"in i&&i.localStorage!==null};d.sessionStorage=function(){try{return"sessionStorage"in i&&i.sessionStorage!==null}catch(a){return false}};d.webworkers=function(){return!!i.Worker};
24 d.applicationCache=function(){var a=i.applicationCache;return!!(a&&typeof a.status!="undefined"&&typeof a.update=="function"&&typeof a.swapCache=="function")};d.svg=function(){return!!e.createElementNS&&!!e.createElementNS("https://www.w3.org/2000/svg","svg").createSVGRect};d.smil=function(){return!!e.createElementNS&&/SVG/.test(M.call(e.createElementNS("https://www.w3.org/2000/svg","animate")))};d.svgclippaths=function(){return!!e.createElementNS&&/SVG/.test(M.call(e.createElementNS("https://www.w3.org/2000/svg",
25 "clipPath")))};for(var z in d)if(O(d,z))N.push(((j[z.toLowerCase()]=d[z]())?"":"no-")+z.toLowerCase());j[E]||P();j.addTest=function(a,b){a=a.toLowerCase();if(!j[a]){b=!!b();s.className+=" "+(b?"":"no-")+a;j[a]=b;return j}};m.cssText="";D=n=null;(function(){var a=e.createElement("div");a.innerHTML="<elem></elem>";return a.childNodes.length!==1})()&&function(a,b){function c(f,k){if(o[f])o[f].styleSheet.cssText+=k;else{var l=t[G],q=b[A]("style");q.media=f;l.insertBefore(q,l[G]);o[f]=q;c(f,k)}}function h(f,
26 k){for(var l=new RegExp("\\b("+w+")\\b(?!.*[;}])","gi"),q=function(B){return".iepp_"+B},x=-1;++x<f.length;){k=f[x].media||k;h(f[x].imports,k);c(k,f[x].cssText.replace(l,q))}}for(var t=b.documentElement,g=b.createDocumentFragment(),o={},w="abbr|article|aside|audio|canvas|command|datalist|details|figure|figcaption|footer|header|hgroup|keygen|mark|meter|nav|output|progress|section|source|summary|time|video",v=w.split("|"),p=[],H=-1,G="firstChild",A="createElement";++H<v.length;){b[A](v[H]);g[A](v[H])}g=
27 g.appendChild(b[A]("div"));a.attachEvent("onbeforeprint",function(){for(var f,k=b.getElementsByTagName("*"),l,q,x=new RegExp("^"+w+"$","i"),B=-1;++B<k.length;
27)if((f=k[B])&&(q=f.nodeName.match(x))){l=new RegExp("^\\s*<"+q+"(.*)\\/"+q+">\\s*$","i");g.innerHTML=f.outerHTML.replace(/\r|\n/g," ").replace(l,f.currentStyle.display=="block"?"<div$1/div>":"<span$1/span>");l=g.childNodes[0];l.className+=" iepp_"+q;l=p[p.length]=[f,l];f.parentNode.replaceChild(l[1],l[0])}h(b.styleSheets,"all")});a.attachEvent("onafterprint",
28 function(){for(var f=-1,k;++f<p.length;)p[f][1].parentNode.replaceChild(p[f][0],p[f][1]);for(k in o)t[G].removeChild(o[k]);o={};p=[]})}(this,e);j._enableHTML5=true;j._version="1.5";s.className=s.className.replace(/\bno-js\b/,"")+" js";s.className+=" "+N.join(" ");return j}(this,this.document);;
29//This file tells the cpanel to remain open on different form submissions. A cookie is set with a different variable on each form. The cookie is also binned when the close (collapse cpanel) button is clicked.
30
31(function($){
32
33  //cookie functions https://www.quirksmode.org/js/cookies.html
34  function createCookie(name,value,days) {
35  	if (days) {
36  		var date = new Date();
37  		date.setTime(date.getTime()+(days*24*60*60*1000));
38  		var expires = "; expires="+date.toGMTString();
39  	} else var expires = "";
40  	document.cookie = name+"="+value+expires+"; path=/";
41  }
42  function readCookie(name) {
43  	var nameEQ = name + "=";
44  	var ca = document.cookie.split(';');
45  	for(var i=0;i < ca.length;i++) {
46  		var c = ca[i];
47  		while (c.charAt(0)==' ') c = c.substring(1,c.length);
48  		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
49  	}
50  	return null;
51  }
52  function eraseCookie(name) {
53  	createCookie(name,"",-1);
54  }
55  //cookie functions
56
57  $(function() {
58
59  	$('.high_contrast_off').click(function(){
60  		var $this = $(this);
61  		if ($this.is('.high_contrast_on')) {
62  			$("body").removeClass('contraston');
63  			$this.html("High Contrast");
64  			$this.removeClass('high_contrast_on');
65  			$this.addClass('high_contrast_off');
66  			eraseCookie('highcontrast');
67  		} else {
68  			$("body").addClass('contraston');
69  			$this.html("High Contrast");
70  			$this.removeClass('high_contrast_off');
71  			$this.addClass('high_contrast_on');
72  			createCookie('highcontrast', 'highcontraston', 365);
73  		}
74  		return false;
75  	});
76
77  	$(".high_contrast_on").click(function() {
78  		$("body").removeClass('contraston');
79  		$(".high_contrast_on").html("High Contrast");
80  		eraseCookie('highcontrast');
81  		$this.removeClass('high_contrast_on');
82  		$this.addClass('high_contrast_off');
83  		return false;
84  	});
85
86  	$(document).ready(function(){
87
88  		var myCookie = readCookie('highcontrast');
89  		if (myCookie == 'highcontraston') {
90  			$("body").addClass('contraston');
91  			$(".high_contrast_off").html("Turn High Contrast Off");
92  			$('.high_contrast_off').addClass('high_contrast_on');
93  			$('.high_contrast_on').removeClass('high_contrast_off');
94  		}
95
96  	});
97
98  });
99
100
101
102  $(function() {
103
104  	$('.textonly_off').click(function(){
105  		var $this = $(this);
106  		if ($this.is('.textonly_on')) {
107  			$("body").removeClass('textonlyon');
108  			$this.html("Turn Text Only On");
109  			$this.removeClass('textonly_on');
110  			$this.addClass('textonly_off');
111  			eraseCookie('textonly');
112  		} else {
113  			$("body").addClass('textonlyon');
114  			$this.html("Turn Text Only Off");
115  			$this.removeClass('textonly_off');
116  			$this.addClass('textonly_on');
117  			createCookie('textonly', 'textonlyon', 365);
118  		}
119  		return false;
120  	});
121
122  	$(".textonly_on").click(function() {
123  		$("body").removeClass('textonlyon');
124  		$(".textonly_on").html("Turn Text Only On");
125  		eraseCookie('textonly');
126  		$this.removeClass('textonly_on');
127  		$this.addClass('textonly_off');
128  		return false;
129  	});
130
131  	$(document).ready(function(){
132
133  		var myCookie = readCookie('textonly');
134  		if (myCookie == 'textonlyon') {
135  			$("body").addClass('textonlyon');
136  			$(".textonly_off").html("Turn Text Only Off");
137  			$('.textonly_off').addClass('textonly_on');
138  			$('.textonly_on').removeClass('textonly_off');
139  		}
140
141  	});
142
143  });
144
145  $(document).ready(function(){
146
147	  var increaseclicks = 0;
148	  var decreaseclicks = 0;
149	  var fontUnit = 'px'; // Change this depending on wether the stylesheet sizes html text in pixels or ems.
150	  var interval = 1; // This will change too, based on the unit you're using. Remember that 1 em usually = whatever your base font size is.
151	  var bodyFontSize = '16';
152	  var originalFontSize = readCookie('fontsize');
153
154
155
156	  // THIS IS WHAT WAS MISSING.
157	  // If the cookie has no value, or doesn't exist. For some reason, the font-size was going massive ~1413px
158	  // Make a check for the font size, otherwise, take it from the stylesheet.
159	  if(originalFontSize == null) {
160	  	originalFontSize = '16';
161	  }
162	  // If, for some reason it's massive still, bring it down to 20 (our max).
163	  if(originalFontSize > 20) {
164	  	originalFontSize = '20';
165	  }
166
167	  var myVar = originalFontSize;
168
169	  $('html').css({'font-size': myVar+fontUnit});
170
171
172	  // Reset Font-Size.
173	  $(".normalFont").click(function(){
174
175	  	$('html').css('font-size', bodyFontSize+fontUnit);
176
177	  	increaseclicks = 0;
178
179	  	decreaseclicks = 0;
180
181	  	eraseCookie('fontsize');
182
183	  	createCookie('fontsize', '16', 365);
184
185	  	return false;
186
187	  });
188
189	  // Increase Font Size
190	  $(".increaseFont").click(function(){
191
192	  	var currentFontSize = $('html').css('font-size');
193
194	  	var currentFontSizeNum = parseFloat(currentFontSize, 10);
195
196	  	// use styles for tags. {IE6 fix} (because tag font size do not change on IE6)
197	  	var newFontSize = currentFontSizeNum + interval;
198
199	  	if (increaseclicks < 5) {
200
201	  		$('html').css({'font-size': newFontSize+fontUnit});
202
203	  		increaseclicks++;
204
205	  		decreaseclicks--;
206
207	  	}
208
209	  	eraseCookie('fontsize');
210
211	  	newFontSize = newFontSize.toString();
212
213	  	createCookie('fontsize', newFontSize, 365);
214
215	  	return false;
216
217	  });
218
219    // Decrease Font Size
220  	$(".decreaseFont").click(function(){
221
222  		var currentFontSize = $('html').css('font-size');
223
224  		var currentFontSizeNum = parseFloat(currentFontSize, 10);
225
226  		var newFontSize = currentFontSizeNum - interval;
227
228  		if (decreaseclicks <5) {
229
230  			$('html').css({'font-size': newFontSize+fontUnit});
231  			decreaseclicks++;
232  			increaseclicks--;
233  		}
234
235  		eraseCookie('fontsize');
236
237  		newFontSize = newFontSize.toString();
238
239  		createCookie('fontsize', newFontSize, 365);
240
241  		return false;
242
243  	});
244
245  });
246
247})(jQuery);;
248/*!
249 * jQuery Cycle Plugin (core logic only)
250 * Examples and documentation at: https://jquery.malsup.com/cycle/
251 * Copyright (c) 2007-2009 M. Alsup
252 * Version: 2.65 (07-APR-2009)
253 * Dual licensed under the MIT and GPL licenses:
254 * https://www.opensource.org/licenses/mit-license.php
255 * https://www.gnu.org/licenses/gpl.html
256 * Requires: jQuery v1.2.6 or later
257 *
258 * Originally based on the work of:
259 *	1) Matt Oakes
260 *	2) Torsten Baldes (https://medienfreunde.com/lab/innerfade/)
261 *	3) Benjamin Sterling (https://www.benjaminsterling.com/experiments/jqShuffle/)
262 */
263;(function($) {
264
265var ver = '2.65';
266
267// if $.support is not defined (pre jQuery 1.3) add what I need
268if ($.support == undefined) {
269	$.support = {
270		opacity: !($.browser.msie)
271	};
272}
273
274function log() {
275	if (window.console && window.console.log)
276		window.console.log('[cycle] ' + Array.prototype.join.call(arguments,' '));
277	//$('body').append('<div>'+Array.prototype.join.call(arguments,' ')+'</div>');
278};
279
280// the options arg can be...
281//   a number  - indicates an immediate transition should occur to the given slide index
282//   a string  - 'stop', 'pause', 'resume', or the name of a transition effect (ie, 'fade', 'zoom', etc)
283//   an object - properties to control the slideshow
284//
285// the arg2 arg can be...
286//   the name of an fx (only used in conjunction with a numeric value for 'options')
287//   the value true (only used in conjunction with a options == 'resume') and indicates
288//     that the resume should occur immediately (not wait for next timeout)
289
290$.fn.cycle = function(options, arg2) {
291	var o = { s: this.selector, c: this.context };
292
293    // in 1.3+ we can fix mistakes with the ready state
294	if (this.length == 0 && options != 'stop') {
295        if (!$.isReady && o.s) {
296            log('DOM not ready, queuing slideshow')
297            $(function() {
298                $(o.s,o.c).cycle(options,arg2);
299            });
300            return this;
301        }
302		// is your DOM ready?  https://docs.jquery.com/Tutorials:Introducing_$(document).ready()
303		log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)'));
304		return this;
305	}
306
307    // iterate the matched nodeset
308	return this.each(function() {
309        options = handleArguments(this, options, arg2);
310        if (options === false)
311            return;
312
313		// stop existing slideshow for this container (if there is one)
314		if (this.cycleTimeout)
315            clearTimeout(this.cycleTimeout);
316		this.cycleTimeout = this.cyclePause = 0;
317
318		var $cont = $(this);
319		var $slides = options.slideExpr ? $(options.slideExpr, this) : $cont.children();
320		var els = $slides.get();
321		if (els.length < 2) {
322			log('terminating; too few slides: ' + els.length);
323			return;
324		}
325
326        var opts = buildOptions($cont, $slides, els, options, o);
327        if (opts === false)
328            return;
329
330        // if it's an auto slideshow, kick it off
331		if (opts.timeout || opts.continuous)
332			this.cycleTimeout = setTimeout(function(){go(els,opts,0,!opts.rev)},
333				opts.continuous ? 10 : opts.timeout + (opts.delay||0));
334	});
335};
336
337// process the args that were passed to the plugin fn
338function handleArguments(cont, options, arg2) {
339	if (cont.cycleStop == undefined)
340		cont.cycleStop = 0;
341	if (options === undefined || options === null)
342		options = {};
343	if (options.constructor == String) {
344		switch(options) {
345		case 'stop':
346			cont.cycleStop++; // callbacks look for change
347			if (cont.cycleTimeout)
348                clearTimeout(cont.cycleTimeout);
349			cont.cycleTimeout = 0;
350			$(cont).removeData('cycle.opts');
351			return false;
352		case 'pause':
353			cont.cyclePause = 1;
354			return false;
355		case 'resume':
356			cont.cyclePause = 0;
357			if (arg2 === true) { // resume now!
358				options = $(cont).data('cycle.opts');
359				if (!options) {
360					log('options not found, can not resume');
361					return false;
362				}
363				if (cont.cycleTimeout) {
364					clearTimeout(cont.cycleTimeout);
365					cont.cycleTimeout = 0;
366				}
367				go(options.elements, options, 1, 1);
368			}
369			return false;
370		default:
371			options = { fx: options };
372		};
373	}
374	else if (options.constructor == Number) {
375		// go to the requested slide
376		var num = options;
377		options = $(cont).data('cycle.opts');
378		if (!options) {
379			log('options not found, can not advance slide');
380			return false;
381		}
382		if (num < 0 || num >= options.elements.length) {
383			log('invalid slide index: ' + num);
384			return false;
385		}
386		options.nextSlide = num;
387		if (cont.cycleTimeout) {
388			clearTimeout(cont.cycleTimeout);
389			cont.cycleTimeout = 0;
390		}
391        if (typeof arg2 == 'string')
392            options.oneTimeFx = arg2;
393		go(options.elements, options, 1, num >= options.currSlide);
394		return false;
395	}
396    return options;
397};
398
399function removeFilter(el, opts) {
400	if (!$.support.opacity && opts.cleartype && el.style.filter) {
401		try { el.style.removeAttribute('filter'); }
402		catch(smother) {} // handle old opera versions
403	}
404};
405
406// one-time initialization
407function buildOptions($cont, $slides, els, options, o) {
408	// support metadata plugin (v1.0 and v2.0)
409	var opts = $.extend({}, $.fn.cycle.defaults, options || {}, $.metadata ? $cont.metadata() : $.meta ? $cont.data() : {});
410	if (opts.autostop)
411		opts.countdown = opts.autostopCount || els.length;
412
413    var cont = $cont[0];
414	$cont.data('cycle.opts', opts);
415	opts.$cont = $cont;
416	opts.stopCount = cont.cycleStop;
417	opts.elements = els;
418	opts.before = opts.before ? [opts.before] : [];
419	opts.after = opts.after ? [opts.after] : [];
420	opts.after.unshift(function(){ opts.busy=0; });
421
422    // push some after callbacks
423	if (!$.support.opacity && opts.cleartype)
424		opts.after.push(function() { removeFilter(this, opts); });
425	if (opts.continuous)
426		opts.after.push(function() { go(els,opts,0,!opts.rev); });
427
428    saveOriginalOpts(opts);
429
430	// clearType corrections
431	if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg)
432		clearTypeFix($slides);
433
434    // container requires non-static position so that slides can be position within
435	if ($cont.css('position') == 'static')
436		$cont.css('position', 'relative');
437	if (opts.width)
438		$cont.width(opts.width);
439	if (opts.height && opts.height != 'auto')
440		$cont.height(opts.height);
441
442	if (opts.startingSlide)
443        opts.startingSlide = parseInt(opts.startingSlide);
444
445    // if random, mix up the slide array
446	if (opts.random) {
447		opts.randomMap = [];
448		for (var i = 0; i < els.length; i++)
449			opts.randomMap.push(i);
450		opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
451		opts.randomIndex = 0;
452		opts.startingSlide = opts.randomMap[0];
453	}
454	else if (opts.startingSlide >= els.length)
455		opts.startingSlide = 0; // catch bogus input
456	opts.currSlide = opts.startingSlide = opts.startingSlide || 0;
457	var first = opts.startingSlide;
458
459    // set position and zIndex on all the slides
460	$slides.css({position: 'absolute', top:0, left:0}).hide().each(function(i) {
461		var z = first ? i >= first ? els.length - (i-first) : first-i : els.length-i;
462		$(this).css('z-index', z)
463	});
464
465    // make sure first slide is visible
466	$(els[first]).css('opacity',1).show(); // opacity bit needed to handle restart use case
467	removeFilter(els[first], opts);
468
469    // stretch slides
470	if (opts.fit && opts.width)
471		$slides.width(opts.width);
472	if (opts.fit && opts.height && opts.height != 'auto')
473		$slides.height(opts.height);
474
475    // stretch container
476	var reshape = opts.containerResize && !$cont.innerHeight();
477	if (reshape) { // do this only if container has no size https://tinyurl.com/da2oa9
478		var maxw = 0, maxh = 0;
479		for(var i=0; i < els.length; i++) {
480			var $e = $(els[i]), e = $e[0], w = $e.outerWidth(), h = $e.outerHeight();
481            if (!w) w = e.offsetWidth;
482            if (!h) h = e.offsetHeight;
483			maxw = w > maxw ? w : maxw;
484			maxh = h > maxh ? h : maxh;
485		}
486        if (maxw > 0 && maxh > 0)
487		    $cont.css({width:maxw+'px',height:maxh+'px'});
488	}
489
490	if (opts.pause)
491		$cont.hover(function(){this.cyclePause++;},function(){this.cyclePause--;});
492
493    if (supportMultiTransitions(opts) === false)
494		return false;
495
496	// run transition init fn
497	if (!opts.multiFx) {
498		var init = $.fn.cycle.transitions[opts.fx];
499		if ($.isFunction(init))
500			init($cont, $slides, opts);
501		else if (opts.fx != 'custom' && !opts.multiFx) {
502			log('unknown transition: ' + opts.fx,'; slideshow terminating');
503			return false;
504		}
505	}
506
507	// apparently a lot of people use image slideshows without height/width attributes on the images.
508	// Cycle 2.50+ requires the sizing info for every slide; this block tries to deal with that.
509	var requeue = false;
510	options.requeueAttempts = options.requeueAttempts || 0;
511	$slides.each(function() {
512        // try to get height/width of each slide
513		var $el = $(this);
514	    this.cycleH = (opts.fit && opts.height) ? opts.height : $el.height();
515		this.cycleW = (opts.fit && opts.width) ? opts.width : $el.width();
516
517		if ( $el.is('img') ) {
518			// sigh..  sniffing, hacking, shrugging...
519			var loadingIE    = ($.browser.msie  && this.cycleW == 28 && this.cycleH == 30 && !this.complete);
520			var loadingOp    = ($.browser.opera && this.cycleW == 42 && this.cycleH == 19 && !this.complete);
521			var loadingOther = (this.cycleH == 0 && this.cycleW == 0 && !this.complete);
522
523			// don't requeue for images that are still loading but have a valid size
524			if (loadingIE || loadingOp || loadingOther) {
525				if (o.s && opts.requeueOnImageNotLoaded && ++options.requeueAttempts < 100) { // track retry count so we don't loop forever
526					log(options.requeueAttempts,' - img slide not loaded, requeuing slideshow: ', this.src, this.cycleW, this.cycleH);
527					setTimeout(function() {$(o.s,o.c).cycle(options)}, opts.requeueTimeout);
528					requeue = true;
529					return false; // break each loop
530				}
531				else {
532					log('could not determine size of image: '+this.src, this.cycleW, this.cycleH);
533				}
534			}
535		}
536		return true;
537	});
538
539	if (requeue)
540		return false;
541
542	opts.cssBefore = opts.cssBefore || {};
543	opts.animIn = opts.animIn || {};
544	opts.animOut = opts.animOut || {};
545
546	$slides.not(':eq('+first+')').css(opts.cssBefore);
547	if (opts.cssFirst)
548		$($slides[first]).css(opts.cssFirst);
549
550	if (opts.timeout) {
551		opts.timeout = parseInt(opts.timeout);
552		// ensure that timeout and speed settings are sane
553		if (opts.speed.constructor == String)
554			opts.speed = $.fx.speeds[opts.speed] || parseInt(opts.speed);
555		if (!opts.sync)
556			opts.speed = opts.speed / 2;
557		while((opts.timeout - opts.speed) < 250) // sanitize timeout
558			opts.timeout += opts.speed;
559	}
560	if (opts.easing)
561		opts.easeIn = opts.easeOut = opts.easing;
562	if (!opts.speedIn)
563		opts.speedIn = opts.speed;
564	if (!opts.speedOut)
565		opts.speedOut = opts.speed;
566
567	opts.slideCount = els.length;
568	opts.currSlide = opts.lastSlide = first;
569	if (opts.random) {
570		opts.nextSlide = opts.currSlide;
571		if (++opts.randomIndex == els.length)
572			opts.randomIndex = 0;
573		opts.nextSlide = opts.randomMap[opts.randomIndex];
574	}
575	else
576		opts.nextSlide = opts.startingSlide >= (els.length-1) ? 0 : opts.startingSlide+1;
577
578	// fire artificial events
579	var e0 = $slides[first];
580	if (opts.before.length)
581		opts.before[0].apply(e0, [e0, e0, opts, true]);
582	if (opts.after.length > 1)
583		opts.after[1].apply(e0, [e0, e0, opts, true]);
584
585	if (opts.next)
586		$(opts.next).click(function(){return advance(opts,opts.rev?-1:1)});
587	if (opts.prev)
588		$(opts.prev).click(function(){return advance(opts,opts.rev?1:-1)});
589	if (opts.pager)
590		buildPager(els,opts);
591
592    exposeAddSlide(opts, els);
593
594    return opts;
595};
596
597// save off original opts so we can restore after clearing state
598function saveOriginalOpts(opts) {
599    opts.original = { before: [], after: [] };
600    opts.original.cssBefore = $.extend({}, opts.cssBefore);
601    opts.original.cssAfter  = $.extend({}, opts.cssAfter);
602    opts.original.animIn    = $.extend({}, opts.animIn);
603    opts.original.animOut   = $.extend({}, opts.animOut);
604	$.each(opts.before, function() { opts.original.before.push(this); });
605	$.each(opts.after,  function() { opts.original.after.push(this); });
606};
607
608function supportMultiTransitions(opts) {
609    var txs = $.fn.cycle.transitions;
610	// look for multiple effects
611	if (opts.fx.indexOf(',') > 0) {
612		opts.multiFx = true;
613		opts.fxs = opts.fx.replace(/\s*/g,'').split(',');
614		// discard any bogus effect names
615		for (var i=0; i < opts.fxs.length; i++) {
616			var fx = opts.fxs[i];
617			var tx = txs[fx];
618			if (!tx || !txs.hasOwnProperty(fx) || !$.isFunction(tx)) {
619				log('discarding unknown transition: ',fx);
620				opts.fxs.splice(i,1);
621				i--;
622			}
623		}
624		// if we have an empty list then we threw everything away!
625		if (!opts.fxs.length) {
626			log('No valid transitions named; slideshow terminating.');
627			return false;
628		}
629	}
630	else if (opts.fx == 'all') {  // auto-gen the list of transitions
631		opts.multiFx = true;
632		opts.fxs = [];
633		for (p in txs) {
634			var tx = txs[p];
635			if (txs.hasOwnProperty(p) && $.isFunction(tx))
636				opts.fxs.push(p);
637		}
638	}
639	if (opts.multiFx && opts.randomizeEffects) {
640		// munge the fxs array to make effect selection random
641		var r1 = Math.floor(Math.random() * 20) + 30;
642		for (var i = 0; i < r1; i++) {
643			var r2 = Math.floor(Math.random() * opts.fxs.length);
644			opts.fxs.push(opts.fxs.splice(r2,1)[0]);
645		}
646		log('randomized fx sequence: ',opts.fxs);
647	}
648	return true;
649};
650
651// provide a mechanism for adding slides after the slideshow has started
652function exposeAddSlide(opts, els) {
653	opts.addSlide = function(newSlide, prepend) {
654		var $s = $(newSlide), s = $s[0];
655		if (!opts.autostopCount)
656			opts.countdown++;
657		els[prepend?'unshift':'push'](s);
658		if (opts.els)
659			opts.els[prepend?'unshift':'push'](s); // shuffle needs this
660		opts.slideCount = els.length;
661
662		$s.css('position','absolute');
663		$s[prepend?'prependTo':'appendTo'](opts.$cont);
664
665		if (prepend) {
666			opts.currSlide++;
667			opts.nextSlide++;
668		}
669
670		if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg)
671			clearTypeFix($s);
672
673		if (opts.fit && opts.width)
674			$s.width(opts.width);
675		if (opts.fit && opts.height && opts.height != 'auto')
676			$slides.height(opts.height);
677		s.cycleH = (opts.fit && opts.height) ? opts.height : $s.height();
678		s.cycleW = (opts.fit && opts.width) ? opts.width : $s.width();
679
680		$s.css(opts.cssBefore);
681
682		if (opts.pager)
683			$.fn.cycle.createPagerAnchor(els.length-1, s, $(opts.pager), els, opts);
684
685		if ($.isFunction(opts.onAddSlide))
686			opts.onAddSlide($s);
687		else
688			$s.hide(); // default behavior
689	};
690}
691
692// reset internal state; we do this on every pass in order to support multiple effects
693$.fn.cycle.resetState = function(opts, fx) {
694    fx = fx || opts.fx;
695	opts.before = []; opts.after = [];
696	opts.cssBefore = $.extend({}, opts.original.cssBefore);
697	opts.cssAfter  = $.extend({}, opts.original.cssAfter);
698	opts.animIn    = $.extend({}, opts.original.animIn);
699	opts.animOut   = $.extend({}, opts.original.animOut);
700	opts.fxFn = null;
701	$.each(opts.original.before, function() { opts.before.push(this); });
702	$.each(opts.original.after,  function() { opts.after.push(this); });
703
704	// re-init
705	var init = $.fn.cycle.transitions[fx];
706	if ($.isFunction(init))
707		init(opts.$cont, $(opts.elements), opts);
708};
709
710// this is the main engine fn, it handles the timeouts, callbacks and slide index mgmt
711function go(els, opts, manual, fwd) {
712    // opts.busy is true if we're in the middle of an animation
713	if (manual && opts.busy && opts.manualTrump) {
714        // let manual transitions requests trump active ones
715		$(els).stop(true,true);
716		opts.busy = false;
717	}
718    // don't begin another timeout-based transition if there is one active
719	if (opts.busy)
720        return;
721
722	var p = opts.$cont[0], curr = els[opts.currSlide], next = els[opts.nextSlide];
723
724    // stop cycling if we have an outstanding stop request
725	if (p.cycleStop != opts.stopCount || p.cycleTimeout === 0 && !manual)
726		return;
727
728    // check to see if we should stop cycling based on autostop options
729	if (!manual && !p.cyclePause &&
730		((opts.autostop && (--opts.countdown <= 0)) ||
731		(opts.nowrap && !opts.random && opts.nextSlide < opts.currSlide))) {
732		if (opts.end)
733			opts.end(opts);
734		return;
735	}
736
737    // if slideshow is paused, only transition on a manual trigger
738	if (manual || !p.cyclePause) {
739        var fx = opts.fx;
740		// keep trying to get the slide size if we don't have it yet
741		curr.cycleH = curr.cycleH || $(curr).height();
742		curr.cycleW = curr.cycleW || $(curr).width();
743		next.cycleH = next.cycleH || $(next).height();
744		next.cycleW = next.cycleW || $(next).width();
745
746		// support multiple transition types
747		if (opts.multiFx) {
748			if (opts.lastFx == undefined || ++opts.lastFx >= opts.fxs.length)
749				opts.lastFx = 0;
750			fx = opts.fxs[opts.lastFx];
751			opts.currFx = fx;
752		}
753
754        // one-time fx overrides apply to:  $('div').cycle(3,'zoom');
755        if (opts.oneTimeFx) {
756            fx = opts.oneTimeFx;
757            opts.oneTimeFx = null;
758        }
759
760        $.fn.cycle.resetState(opts, fx);
761
762        // run the before callbacks
763		if (opts.before.length)
764			$.each(opts.before, function(i,o) {
765				if (p.cycleStop != opts.stopCount) return;
766				o.apply(next, [curr, next, opts, fwd]);
767			});
768
769        // stage the after callacks
770		var after = function() {
771			$.each(opts.after, function(i,o) {
772				if (p.cycleStop != opts.stopCount) return;
773				o.apply(next, [curr, next, opts, fwd]);
774			});
775		};
776
777		if (opts.nextSlide != opts.currSlide) {
778            // get ready to perform the transition
779			opts.busy = 1;
780			if (opts.fxFn) // fx function provided?
781				opts.fxFn(curr, next, opts, after, fwd);
782			else if ($.isFunction($.fn.cycle[opts.fx])) // fx plugin ?
783				$.fn.cycle[opts.fx](curr, next, opts, after);
784			else
785				$.fn.cycle.custom(curr, next, opts, after, manual && opts.fastOnEvent);
786		}
787
788        // calculate the next slide
789		opts.lastSlide = opts.currSlide;
790		if (opts.random) {
791			opts.currSlide = opts.nextSlide;
792			if (++opts.randomIndex == els.length)
793				opts.randomIndex = 0;
794			opts.nextSlide = opts.randomMap[opts.randomIndex];
795		}
796		else { // sequence
797			var roll = (opts.nextSlide + 1) == els.length;
798			opts.nextSlide = roll ? 0 : opts.nextSlide+1;
799			opts.currSlide = roll ? els.length-1 : opts.nextSlide-1;
800		}
801
802		if (opts.pager)
803			$.fn.cycle.updateActivePagerLink(opts.pager, opts.currSlide);
804	}
805
806    // stage the next transtion
807    var ms = 0;
808	if (opts.timeout && !opts.continuous)
809        ms = getTimeout(curr, next, opts, fwd);
810    else if (opts.continuous && p.cyclePause) // continuous shows work off an after callback, not this timer logic
811        ms = 10;
812    if (ms > 0)
813        p.cycleTimeout = setTimeout(function(){ go(els, opts, 0, !opts.rev) }, ms);
814};
815
816// invoked after transition
817$.fn.cycle.updateActivePagerLink = function(pager, currSlide) {
818	$(pager).find('a').removeClass('activeSlide').filter('a:eq('+currSlide+')').addClass('activeSlide');
819};
820
821// calculate timeout value for current transition
822function getTimeout(curr, next, opts, fwd) {
823	if (opts.timeoutFn) {
824        // call user provided calc fn
825		var t = opts.timeoutFn(curr,next,opts,fwd);
826		if (t !== false)
827			return t;
828	}
829	return opts.timeout;
830};
831
832// expose next/prev function, caller must pass in state
833$.fn.cycle.next = function(opts) { advance(opts, opts.rev?-1:1); };
834$.fn.cycle.prev = function(opts) { advance(opts, opts.rev?1:-1);};
835
836// advance slide forward or back
837function advance(opts, val) {
838    var els = opts.elements;
839	var p = opts.$cont[0], timeout = p.cycleTimeout;
840	if (timeout) {
841		clearTimeout(timeout);
842		p.cycleTimeout = 0;
843	}
844	if (opts.random && val < 0) {
845		// move back to the previously display slide
846		opts.randomIndex--;
847		if (--opts.randomIndex == -2)
848			opts.randomIndex = els.length-2;
849		else if (opts.randomIndex == -1)
850			opts.randomIndex = els.length-1;
851		opts.nextSlide = opts.randomMap[opts.randomIndex];
852	}
853	else if (opts.random) {
854		if (++opts.randomIndex == els.length)
855			opts.randomIndex = 0;
856		opts.nextSlide = opts.randomMap[opts.randomIndex];
857	}
858	else {
859		opts.nextSlide = opts.currSlide + val;
860		if (opts.nextSlide < 0) {
861			if (opts.nowrap) return false;
862			opts.nextSlide = els.length - 1;
863		}
864		else if (opts.nextSlide >= els.length) {
865			if (opts.nowrap) return false;
866			opts.nextSlide = 0;
867		}
868	}
869
870	if ($.isFunction(opts.prevNextClick))
871		opts.prevNextClick(val > 0, opts.nextSlide, els[opts.nextSlide]);
872	go(els, opts, 1, val>=0);
873	return false;
874};
875
876function buildPager(els, opts) {
877	var $p = $(opts.pager);
878	$.each(els, function(i,o) {
879		$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);
880	});
881   $.fn.cycle.updateActivePagerLink(opts.pager, opts.startingSlide);
882};
883
884$.fn.cycle.createPagerAnchor = function(i, el, $p, els, opts) {
885	var a = ($.isFunction(opts.pagerAnchorBuilder))
886		? opts.pagerAnchorBuilder(i,el)
887		: '<a href="#">'+(i+1)+'</a>';
888	if (!a)
889		return;
890	var $a = $(a);
891	// don't reparent if anchor is in the dom
892	if ($a.parents('body').length == 0) {
893		var arr = [];
894		if ($p.length > 1) {
895			$p.each(function() {
896				var $clone = $a.clone(true);
897				$(this).append($clone);
898				arr.push($clone);
899			});
900			$a = $(arr);
901		}
902		else {
903			$a.appendTo($p);
904		}
905	}
906
907	$a.bind(opts.pagerEvent, function() {
908		opts.nextSlide = i;
909		var p = opts.$cont[0], timeout = p.cycleTimeout;
910		if (timeout) {
911			clearTimeout(timeout);
912			p.cycleTimeout = 0;
913		}
914		if ($.isFunction(opts.pagerClick))
915			opts.pagerClick(opts.nextSlide, els[opts.nextSlide]);
916		go(els,opts,1,opts.currSlide < i); // trigger the trans
917		return false;
918	});
919	if (opts.pauseOnPagerHover)
920		$a.hover(function() { opts.$cont[0].cyclePause++; }, function() { opts.$cont[0].cyclePause--; } );
921};
922
923// helper fn to calculate the number of slides between the current and the next
924$.fn.cycle.hopsFromLast = function(opts, fwd) {
925	var hops, l = opts.lastSlide, c = opts.currSlide;
926	if (fwd)
927		hops = c > l ? c - l : opts.slideCount - l;
928	else
929		hops = c < l ? l - c : l + opts.slideCount - c;
930	return hops;
931};
932
933// fix clearType problems in ie6 by setting an explicit bg color
934// (otherwise text slides look horrible during a fade transition)
935function clearTypeFix($slides) {
936	function hex(s) {
937		s = parseInt(s).toString(16);
938		return s.length < 2 ? '0'+s : s;
939	};
940	function getBg(e) {
941		for ( ; e && e.nodeName.toLowerCase() != 'html'; e = e.parentNode) {
942			var v = $.css(e,'background-color');
943			if (v.indexOf('rgb') >= 0 ) {
944				var rgb = v.match(/\d+/g);
945				return '#'+ hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);
946			}
947			if (v && v != 'transparent')
948				return v;
949		}
950		return '#ffffff';
951	};
952	$slides.each(function() { $(this).css('background-color', getBg(this)); });
953};
954
955// reset common props before the next transition
956$.fn.cycle.commonReset = function(curr,next,opts,w,h,rev) {
957	$(opts.elements).not(curr).hide();
958	opts.cssBefore.opacity = 1;
959	opts.cssBefore.display = 'block';
960	if (w !== false && next.cycleW > 0)
961		opts.cssBefore.width = next.cycleW;
962	if (h !== false && next.cycleH > 0)
963		opts.cssBefore.height = next.cycleH;
964	opts.cssAfter = opts.cssAfter || {};
965	opts.cssAfter.display = 'none';
966	$(curr).css('zIndex',opts.slideCount + (rev === true ? 1 : 0));
967	$(next).css('zIndex',opts.slideCount + (rev === true ? 0 : 1));
968};
969
970// the actual fn for effecting a transition
971$.fn.cycle.custom = function(curr, next, opts, cb, speedOverride) {
972	var $l = $(curr), $n = $(next);
973	var speedIn = opts.speedIn, speedOut = opts.speedOut, easeIn = opts.easeIn, easeOut = opts.easeOut;
974	$n.css(opts.cssBefore);
975	if (speedOverride) {
976		if (typeof speedOverride == 'number')
977			speedIn = speedOut = speedOverride;
978		else
979			speedIn = speedOut = 1;
980		easeIn = easeOut = null;
981	}
982	var fn = function() {$n.animate(opts.animIn, speedIn, easeIn, cb)};
983	$l.animate(opts.animOut, speedOut, easeOut, function() {
984		if (opts.cssAfter) $l.css(opts.cssAfter);
985		if (!opts.sync) fn();
986	});
987	if (opts.sync) fn();
988};
989
990// transition definitions - only fade is defined here, transition pack defines the rest
991$.fn.cycle.transitions = {
992	fade: function($cont, $slides, opts) {
993		$slides.not(':eq('+opts.currSlide+')').css('opacity',0);
994		opts.before.push(function(curr,next,opts) {
995			$.fn.cycle.commonReset(curr,next,opts);
996			opts.cssBefore.opacity = 0;
997		});
998		opts.animIn	   = { opacity: 1 };
999		opts.animOut   = { opacity: 0 };
1000		opts.cssBefore = { top: 0, left: 0 };
1001	}
1002};
1003
1004$.fn.cycle.ver = function() { return ver; };
1005
1006// override these globally if you like (they are all optional)
1007$.fn.cycle.defaults = {
1008	fx:			  'fade', // name of transition effect (or comma separated names, ex: fade,scrollUp,shuffle)
1009	timeout:	   4000,  // milliseconds between slide transitions (0 to disable auto advance)
1010	timeoutFn:     null,  // callback for determining per-slide timeout value:  function(currSlideElement, nextSlideElement, options, forwardFlag)
1011	continuous:	   0,	  // true to start next transition immediately after current one completes
1012	speed:		   1000,  // speed of the transition (any valid fx speed value)
1013	speedIn:	   null,  // speed of the 'in' transition
1014	speedOut:	   null,  // speed of the 'out' transition
1015	next:		   null,  // selector for element to use as click trigger for next slide
1016	prev:		   null,  // selector for element to use as click trigger for previous slide
1017	prevNextClick: null,  // callback fn for prev/next clicks:	function(isNext, zeroBasedSlideIndex, slideElement)
1018	pager:		   null,  // selector for element to use as pager container
1019	pagerClick:	   null,  // callback fn for pager clicks:	function(zeroBasedSlideIndex, slideElement)
1020	pagerEvent:	  'click', // name of event which drives the pager navigation
1021	pagerAnchorBuilder: null, // callback fn for building anchor links:  function(index, DOMelement)
1022	before:		   null,  // transition callback (scope set to element to be shown):     function(currSlideElement, nextSlideElement, options, forwardFlag)
1023	after:		   null,  // transition callback (scope set to element that was shown):  function(currSlideElement, nextSlideElement, options, forwardFlag)
1024	end:		   null,  // callback invoked when the slideshow terminates (use with autostop or nowrap options): function(options)
1025	easing:		   null,  // easing method for both in and out transitions
1026	easeIn:		   null,  // easing for "in" transition
1027	easeOut:	   null,  // easing for "out" transition
1028	shuffle:	   null,  // coords for shuffle animation, ex: { top:15, left: 200 }
1029	animIn:		   null,  // properties that define how the slide animates in
1030	animOut:	   null,  // properties that define how the slide animates out
1031	cssBefore:	   null,  // properties that define the initial state of the slide before transitioning in
1032	cssAfter:	   null,  // properties that defined the state of the slide after transitioning out
1033	fxFn:		   null,  // function used to control the transition: function(currSlideElement, nextSlideElement, options, afterCalback, forwardFlag)
1034	height:		  'auto', // container height
1035	startingSlide: 0,	  // zero-based index of the first slide to be displayed
1036	sync:		   1,	  // true if in/out transitions should occur simultaneously
1037	random:		   0,	  // true for random, false for sequence (not applicable to shuffle fx)
1038	fit:		   0,	  // force slides to fit container
1039	containerResize: 1,	  // resize container to fit largest slide
1040	pause:		   0,	  // true to enable "pause on hover"
1041	pauseOnPagerHover: 0, // true to pause when hovering over pager link
1042	autostop:	   0,	  // true to end slideshow after X transitions (where X == slide count)
1043	autostopCount: 0,	  // number of transitions (optionally used with autostop to define X)
1044	delay:		   0,	  // additional delay (in ms) for first transition (hint: can be negative)
1045	slideExpr:	   null,  // expression for selecting slides (if something other than all children is required)
1046	cleartype:	   !$.support.opacity,  // true if clearType corrections should be applied (for IE)
1047	nowrap:		   0,	  // true to prevent slideshow from wrapping
1048	fastOnEvent:   0,	  // force fast transitions when triggered manually (via pager or prev/next); value == time in ms
1049	randomizeEffects: 1,  // valid when multiple effects are used; true to make the effect sequence random
1050	rev:           0,     // causes animations to transition in reverse
1051	manualTrump:   true,  // causes manual transition to stop an active transition instead of being ignored
1052	requeueOnImageNotLoaded: true, // requeue the slideshow if any image slides are not yet loaded
1053	requeueTimeout: 250   // ms delay for requeue
1054};
1055
1056})(jQuery);
1057;
1058(function($){
1059
1060  $(document).ready(function(){
1061
1062   // Homepage slideshow
1063   $('#slideshow .view-content').cycle({
1064    timeout: 7000,
1065    speed: 2000,
1066    height: '290px',
1067    pager: '#paginate'
1068   });
1069
1070   // Submit the jump menu
1071   $(".block-jump select").change(function(){
1072    this.form.submit();
1073   });
1074
1075   $(".block-jump .form-submit").hide();
1076
1077
1078   // Search field text
1079   if ($(".block-search .form-text").val() == '') {
1080    $(".block-search .form-text").val("Keyword search");
1081   }
1082
1083   $(".block-search .form-text").click(function(){
1084     $(this).val('');
1085   });
1086
1087   $(".block-search .form-text").blur(function(){
1088    if ($(".block-search .form-text").val() == '') {
1089     $(this).val("Keyword search");
1090    }
1091   });
1092
1093  });
1094
1095})(jQuery);;
1096/**
1097 * jQuery.ScrollTo
1098 * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | https://flesler.blogspot.com
1099 * Dual licensed under MIT and GPL.
1100 * Date: 3/9/2009
1101 *
1102 * @projectDescription Easy element scrolling using jQuery.
1103 * https://flesler.blogspot.com/2007/10/jqueryscrollto.html
1104 * Works with jQuery +1.2.6. Tested on FF 2/3, IE 6/7, Opera 9.5/6, Safari 3, Chrome 1 on WinXP.
1105 *
1106 * @author Ariel Flesler
1107 * @version 1.4.1
1108 *
1109 * @id jQuery.scrollTo
1110 * @id jQuery.fn.scrollTo
1111 * @param {String, Number, DOMElement, jQuery, Object} target Where to scroll the matched elements.
1112 *	  The different options for target are:
1113 *		- A number position (will be applied to all axes).
1114 *		- A string position ('44', '100px', '+=90', etc ) will be applied to all axes
1115 *		- A jQuery/DOM element ( logically, child of the element to scroll )
1116 *		- A string selector, that will be relative to the element to scroll ( 'li:eq(2)', etc )
1117 *		- A hash { top:x, left:y }, x and y can be any kind of number/string like above.
1118 * @param {Number} duration The OVERALL length of the animation, this argument can be the settings object instead.
1119 * @param {Object,Function} settings Optional set of settings or the onAfter callback.
1120 *	 @option {String} axis Which axis must be scrolled, use 'x', 'y', 'xy' or 'yx'.
1121 *	 @option {Number} duration The OVERALL length of the animation.
1122 *	 @option {String} easing The easing method for the animation.
1123 *	 @option {Boolean} margin If true, the margin of the target element will be deducted from the final position.
1124 *	 @option {Object, Number} offset Add/deduct from the end position. One number for both axes or { top:x, left:y }.
1125 *	 @option {Object, Number}
1125 over Add/deduct the height/width multiplied by 'over', can be { top:x, left:y } when using both axes.
1126 *	 @option {Boolean} queue If true, and both axis are given, the 2nd axis will only be animated after the first one ends.
1127 *	 @option {Function} onAfter Function to be called after the scrolling ends. 
1128 *	 @option {Function} onAfterFirst If queuing is activated, this function will be called after the first scrolling ends.
1129 * @return {jQuery} Returns the same jQuery object, for chaining.
1130 *
1131 * @desc Scroll to a fixed position
1132 * @example $('div').scrollTo( 340 );
1133 *
1134 * @desc Scroll relatively to the actual position
1135 * @example $('div').scrollTo( '+=340px', { axis:'y' } );
1136 *
1137 * @dec Scroll using a selector (relative to the scrolled element)
1138 * @example $('div').scrollTo( 'p.paragraph:eq(2)', 500, { easing:'swing', queue:true, axis:'xy' } );
1139 *
1140 * @ Scroll to a DOM element (same for jQuery object)
1141 * @example var second_child = document.getElementById('container').firstChild.nextSibling;
1142 *			$('#container').scrollTo( second_child, { duration:500, axis:'x', onAfter:function(){
1143 *				alert('scrolled!!');																   
1144 *			}});
1145 *
1146 * @desc Scroll on both axes, to different values
1147 * @example $('div').scrollTo( { top: 300, left:'+=200' }, { axis:'xy', offset:-20 } );
1148 */
1149;(function( $ ){
1150	
1151	var $scrollTo = $.scrollTo = function( target, duration, settings ){
1152		$(window).scrollTo( target, duration, settings );
1153	};
1154
1155	$scrollTo.defaults = {
1156		axis:'xy',
1157		duration: parseFloat($.fn.jquery) >= 1.3 ? 0 : 1
1158	};
1159
1160	// Returns the element that needs to be animated to scroll the window.
1161	// Kept for backwards compatibility (specially for localScroll & serialScroll)
1162	$scrollTo.window = function( scope ){
1163		return $(window).scrollable();
1164	};
1165
1166	// Hack, hack, hack... stay away!
1167	// Returns the real elements to scroll (supports window/iframes, documents and regular nodes)
1168	$.fn.scrollable = function(){
1169		return this.map(function(){
1170			var elem = this,
1171				isWin = !elem.nodeName || $.inArray( elem.nodeName.toLowerCase(), ['iframe','#document','html','body'] ) != -1;
1172
1173				if( !isWin )
1174					return elem;
1175
1176			var doc = (elem.contentWindow || elem).document || elem.ownerDocument || elem;
1177			
1178			return $.browser.safari || doc.compatMode == 'BackCompat' ?
1179				doc.body : 
1180				doc.documentElement;
1181		});
1182	};
1183
1184	$.fn.scrollTo = function( target, duration, settings ){
1185		if( typeof duration == 'object' ){
1186			settings = duration;
1187			duration = 0;
1188		}
1189		if( typeof settings == 'function' )
1190			settings = { onAfter:settings };
1191			
1192		if( target == 'max' )
1193			target = 9e9;
1194			
1195		settings = $.extend( {}, $scrollTo.defaults, settings );
1196		// Speed is still recognized for backwards compatibility
1197		duration = duration || settings.speed || settings.duration;
1198		// Make sure the settings are given right
1199		settings.queue = settings.queue && settings.axis.length > 1;
1200		
1201		if( settings.queue )
1202			// Let's keep the overall duration
1203			duration /= 2;
1204		settings.offset = both( settings.offset );
1205		settings.over = both( settings.over );
1206
1207		return this.scrollable().each(function(){
1208			var elem = this,
1209				$elem = $(elem),
1210				targ = target, toff, attr = {},
1211				win = $elem.is('html,body');
1212
1213			switch( typeof targ ){
1214				// A number will pass the regex
1215				case 'number':
1216				case 'string':
1217					if( /^([+-]=)?\d+(\.\d+)?(px)?$/.test(targ) ){
1218						targ = both( targ );
1219						// We are done
1220						break;
1221					}
1222					// Relative selector, no break!
1223					targ = $(targ,this);
1224				case 'object':
1225					// DOMElement / jQuery
1226					if( targ.is || targ.style )
1227						// Get the real position of the target 
1228						toff = (targ = $(targ)).offset();
1229			}
1230			$.each( settings.axis.split(''), function( i, axis ){
1231				var Pos	= axis == 'x' ? 'Left' : 'Top',
1232					pos = Pos.toLowerCase(),
1233					key = 'scroll' + Pos,
1234					old = elem[key],
1235					Dim = axis == 'x' ? 'Width' : 'Height';
1236
1237				if( toff ){// jQuery / DOMElement
1238					attr[key] = toff[pos] + ( win ? 0 : old - $elem.offset()[pos] );
1239
1240					// If it's a dom element, reduce the margin
1241					if( settings.margin ){
1242						attr[key] -= parseInt(targ.css('margin'+Pos)) || 0;
1243						attr[key] -= parseInt(targ.css('border'+Pos+'Width')) || 0;
1244					}
1245					
1246					attr[key] += settings.offset[pos] || 0;
1247					
1248					if( settings.over[pos] )
1249						// Scroll to a fraction of its width/height
1250						attr[key] += targ[Dim.toLowerCase()]() * settings.over[pos];
1251				}else
1252					attr[key] = targ[pos];
1253
1254				// Number or 'number'
1255				if( /^\d+$/.test(attr[key]) )
1256					// Check the limits
1257					attr[key] = attr[key] <= 0 ? 0 : Math.min( attr[key], max(Dim) );
1258
1259				// Queueing axes
1260				if( !i && settings.queue ){
1261					// Don't waste time animating, if there's no need.
1262					if( old != attr[key] )
1263						// Intermediate animation
1264						animate( settings.onAfterFirst );
1265					// Don't animate this axis again in the next iteration.
1266					delete attr[key];
1267				}
1268			});
1269
1270			animate( settings.onAfter );			
1271
1272			function animate( callback ){
1273				$elem.animate( attr, duration, settings.easing, callback && function(){
1274					callback.call(this, target, settings);
1275				});
1276			};
1277
1278			// Max scrolling position, works on quirks mode
1279			// It only fails (not too badly) on IE, quirks mode.
1280			function max( Dim ){
1281				var scroll = 'scroll'+Dim;
1282				
1283				if( !win )
1284					return elem[scroll];
1285				
1286				var size = 'client' + Dim,
1287					html = elem.ownerDocument.documentElement,
1288					body = elem.ownerDocument.body;
1289
1290				return Math.max( html[scroll], body[scroll] ) 
1291					 - Math.min( html[size]  , body[size]   );
1292					
1293			};
1294
1295		}).end();
1296	};
1297
1298	function both( val ){
1299		return typeof val == 'object' ? val : { top:val, left:val };
1300	};
1301
1302})( jQuery );;
1303/**
1304 * ScrollView - jQuery plugin 0.1
1305 *
1306 * This plugin supplies contents view by grab and drag scroll.
1307 *
1308 * Copyright (c) 2009 Toshimitsu Takahashi
1309 *
1310 * Released under the MIT license.
1311 *
1312 * == Usage =======================
1313 *   // apply to block element.
1314 *   $("#map").scrollview();
1315 *   
1316 *   // with setting grab and drag icon urls.
1317 *   //   grab: the cursor when mouse button is up.
1318 *   //   grabbing: the cursor when mouse button is down.
1319 *   //
1320 *   $("#map".scrollview({
1321 *     grab : "images/openhand.cur",
1322 *     grabbing : "images/closedhand.cur"
1323 *   });
1324 * ================================
1325 */
1326(function() {
1327    function ScrollView(){ this.initialize.apply(this, arguments) }
1328    ScrollView.prototype = {
1329        initialize: function(container, config){
1330                // setting cursor.
1331                var gecko = navigator.userAgent.indexOf("Gecko/") != -1;
1332                var opera = navigator.userAgent.indexOf("Opera/") != -1;
1333                var mac = navigator.userAgent.indexOf("Mac OS") != -1;
1334                if (opera) {
1335                    this.grab = "default";
1336                    this.grabbing = "move";
1337                } else if (!(mac && gecko) && config) {
1338                    if (config.grab) {
1339                       this.grab = "url(\"" + config.grab + "\"),default";
1340                    }
1341                    if (config.grabbing) {
1342                       this.grabbing = "url(" + config.grabbing + "),move";
1343                    }
1344                } else if (gecko) {
1345                    this.grab = "-moz-grab";
1346                    this.grabbing = "-moz-grabbing";
1347                } else {
1348                    this.grab = "default";
1349                    this.grabbing = "move";
1350                }
1351                
1352                // Get container and image.
1353                this.m = $(container);
1354                this.i = this.m.children().css("cursor", this.grab);
1355                
1356                this.isgrabbing = false;
1357                
1358                // Set mouse events.
1359                var self = this;
1360                this.i.mousedown(function(e){
1361                        self.startgrab();
1362                        this.xp = e.pageX;
1363                        this.yp = e.pageY;
1364                        return false;
1365                }).mousemove(function(e){
1366                        if (!self.isgrabbing) return true;
1367                        self.scrollTo(this.xp - e.pageX, this.yp - e.pageY);
1368                        this.xp = e.pageX;
1369                        this.yp = e.pageY;
1370                        return false;
1371                })
1372                .mouseout(function(){ self.stopgrab() })
1373                .mouseup(function(){ self.stopgrab() })
1374                .dblclick(function(){
1375                        var _m = self.m;
1376                        var off = _m.offset();
1377                        var dx = this.xp - off.left - _m.width() / 2;
1378                        if (dx < 0) {
1379                                dx = "+=" + dx + "px";
1380                        } else {
1381                                dx = "-=" + -dx + "px";
1382                        }
1383                        var dy = this.yp - off.top - _m.height() / 2;
1384                        if (dy < 0) {
1385                                dy = "+=" + dy + "px";
1386                        } else {
1387                                dy = "-=" + -dy + "px";
1388                        }
1389                        _m.animate({ scrollLeft:  dx, scrollTop: dy },
1390                                "normal", "swing");
1391                });
1392                
1393                this.centering();
1394        },
1395        centering: function(){
1396                var _m = this.m;
1397                var w = this.i.width() - _m.width();
1398                var h = this.i.height() - _m.height();
1399                _m.scrollLeft(w / 2).scrollTop(h / 2);
1400        },
1401        startgrab: function(){
1402                this.isgrabbing = true;
1403                this.i.css("cursor", this.grabbing);
1404        },
1405        stopgrab: function(){
1406                this.isgrabbing = false;
1407                this.i.css("cursor", this.grab);
1408        },
1409        scrollTo: function(dx, dy){
1410                var _m = this.m;
1411                var x = _m.scrollLeft() + dx;
1412                var y = _m.scrollTop() + dy;
1413                _m.scrollLeft(x).scrollTop(y);
1414        }
1415    };
1416    
1417    jQuery.fn.scrollview = function(config){
1418        return this.each(function(){
1419            new ScrollView(this, config);
1420        });
1421    };
1422})(jQuery);
1423;
1424(function($){
1425
1426  $(function(){
1427
1428	  $("#mainsection.forum.numeric #forum thead th:first-child, #mainsection.forum.numeric #forum tbody tr td:first-child").addClass('first');
1429
1430	  $("#mainsection.forum.numeric #forum thead th:nth-child(2)").addClass('second');
1431
1432	  $('#test')
1433		.removeClass('highlight')
1434		.find('a')
1435		.append('<span class="hover" />').each(function () {
1436				var $span = $('> span.hover', this).css('opacity', 0);
1437				$(this).hover(function () {
1438					// on hover
1439					$span.stop().fadeTo(450, 1);
1440				}, function () {
1441					// off hover
1442					$span.stop().fadeTo(450, 0);
1443				});
1444		});
1445
1446  });
1447
1448})(jQuery);;
1449(function($){
1450
1451  $(document).ready(function(){
1452
1453    // Grab to move around
1454    //$("#pane-target").scrollview({
1455    //  grab:"SmoothMove.cur",
1456    //  grabbing:"SmoothMove.cur"
1457    //});
1458
1459    // Bug fix for ie
1460    $("#pane-target").animate({ height: '1066px' }, 400);
1461
1462    // Set what should be the location on load
1463    $("#pane-target").stop().scrollTo( {top:245,left:0}, 0, { queue:true } );
1464
1465    // Hide the noscript in ie
1466    $("noscript").hide();
1467
1468    // By default, the scroll is only done vertically (\'y\'), change it to both.
1469    //$.scrollTo.defaults.axis = 'xy';
1470
1471    // This one is important, many browsers do not reset scroll on refreshes
1472    //$.scrollTo( 0 ); //reset the screen to (0,0)
1473
1474    $(".pin a").click(function() {
1475      $(".allbox").fadeOut('slow');
1476      $(this).parent().parent().children('.allbox').fadeIn('fast');
1477      $(".map_link").removeClass('active');
1478      //$('#pane-target').stop().scrollTo( {top:<?php print $mynode->field_pos_y[0]['value'] ?>
1478 - 280,left:<?php print $mynode->field_pos_x[0]['value'] ?> - 400}, 1200, { queue:true } );
1479      return false;
1480  });
1481
1482    // Close popup
1483    $(".allbox .close").click(function() {
1484      console.log('test');
1485      $(this).parent().parent('.allbox').fadeOut('normal');
1486      return false;
1487    });
1488
1489    // More or less map height
1490    $(".controls #up").fadeTo("normal", 0.2);
1491    $(".controls #down").fadeTo("normal", 0.2);
1492
1493    $(".size_map_less").click(function(){
1494      var $this = $(this);
1495      if ($this.is(".size_map_less")) {
1496        $(".map_wrapper").animate({ height: '500px' }, 400);
1497        $("#pane-target").animate({ height: '500px' }, 400);
1498        $this.removeClass("size_map_less");
1499        $this.addClass("size_map_more");
1500        $(".controls #up").fadeTo("normal", 1.0);
1501        $(".controls #down").fadeTo("normal", 1.0);
1502      } else {
1503        $(".map_wrapper").animate({ height: '1066px' }, 400);
1504        $("#pane-target").animate({ height: '1066px' }, 400);
1505        $this.removeClass("size_map_more");
1506        $this.addClass("size_map_less");
1507        $(".controls #up").fadeTo("normal", 0.2);
1508        $(".controls #down").fadeTo("normal", 0.2);
1509      }
1510      return false;
1511    });
1512
1513    // Nudge
1514    $("#up").click(function(){
1515      $("#pane-target").stop().scrollTo( {top:'-=200px',left:'+=0'}, 500 );
1516      return false;
1517    });
1518
1519    $("#down").click(function(){
1520      $("#pane-target").stop().scrollTo( {top:'+=200px',left:'+=0'}, 500 );
1521      return false;
1522    });
1523
1524    // Key
1525    $(".key_open").click(function(){
1526      $("#key_area").slideToggle();
1527      var $this = $(this);
1528      if ($this.is(".key_open")) {
1529        $this.removeClass("key_open");
1530        $this.addClass("key_close");
1531      } else {
1532        $this.removeClass("key_close");
1533        $this.addClass("key_open");
1534      }
1535      return false;
1536    });
1537
1538  });
1539
1540})(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.