PageSourceSearch

https://www.sipotra.it/wp-content/themes/sophina/assets/js/onLoad.js?ver=1.0

js sipotra.it collected 2026-10-02 06:41:29 UTC 34,771 bytes, 441 lines download raw bytes

1jQuery(document).ready(function($) {
2
3	// UberMenu (align right helper)
4	// -------------------------------------------------------------------
5	if ( $('.navRight .ubermenu-nav').length ) {
6		$('.navRight .ubermenu-nav').prepend( $('<li id="menu-item-phantom"></li>'));
7		// Max the width of phantom first item
8		var uberFitRight = function() {
9			$phantom = $('#menu-item-phantom');  // get phantom itme
10			$phantom.css('position','absolute'); // remove item to start
11
12			$megaMenu = $('nav.ubermenu.ubermenu-main');    // get menu <nav>
13			$megaUber = $('.ubermenu-nav');    // get menu <ul>
14			$megaUber.css('width','auto'); // make width adjustable
15
16			emptySpace = $megaMenu.parent().width() - $megaMenu.width() - 3; // find empty space (take extra 3px to be safe)
17
18			$phantom.css({'width':emptySpace+'px', 'position':'relative'}); // return item and set width
19			$megaUber.css('width','100%'); // reset width 100%
20
21			$(window).trigger('adjustMenu');
22			//$(window).trigger('resize'); // after menu is positioned, to ensure drop downs have adjusted
23		}
24	}
25
26	// Icons in image overlays
27	$('a[class*="-image"]').find('.inner-overlay').html('<i class="fa fa-plus"></i>');             // standard
28	$('a[class*="-image"].audio').find('.inner-overlay').html('<i class="fa fa-volume-up"></i>');  // audio
29	$('a[class*="-image"].image').find('.inner-overlay').html('<i class="fa fa-picture-o"></i>');    // image
30	$('a[class*="-image"].gallery').find('.inner-overlay').html('<i class="fa fa-picture-o"></i>');  // gallery
31	// Icons in image overlays - hover effects
32	$('a.styled-image, a.plain-image').on({
33		mouseenter: function(){
34			$(this).find('.inner-overlay i').stop(true).delay(175).animate({ 'opacity': 1, 'margin-top': '-21px' }, 250 );
35		},
36		mouseleave: function(){
37			$(this).find('.inner-overlay i').stop(true).animate({ 'opacity': 0, 'margin-top': '-11px' }, 250, function(){ 
38				$(this).css('margin-top','-31px'); // reset position
39			});
40		}
41	});
42
43
44	// Responsive video embeds
45	// -------------------------------------------------------------------
46	$(".entry-content, .video-container").fitVids();
47
48
49	// Lightbox (colorbox)
50	// -------------------------------------------------------------------
51	
52	if( jQuery().colorbox) {
53
54		// Defaults
55		cb_opacity = 0.7;
56		cb_close   = '&#xF00D'; // FontAwesome icons
57		cb_next    = '&#xF054';
58		cb_prev    = '&#xF053';
59		
60		// WP [gallery] (groups items for lightbox next/prev) 
61		$(".gallery .gallery-item a").attr('rel','gallery');
62
63		// Attach rel attribute for groups
64		$("[data-lightbox]").each( function() {
65			$(this).attr('rel',$(this).data('lightbox'));
66		});
67
68		// Lightbox for YouTube 
69		$("a.popup[href*='youtube.co'], a.popup[href*='youtu.be']").colorbox({
70			href: function() {
71				var videoID = this.href.match(/(youtu\.be\/|&*v=|\/v\/|\/embed\/)+([A-Za-z0-9\-_]{5,11})/);  // get video id
72				var id = videoID[2];
73				url = 'http://www.youtube.com/embed/' + id;
74				if (!id) url = this.href; // if no id was found return original URL
75				return url;
76			},
77			iframe:true,
78			innerWidth: function() {
79				// get width from url (if entered)
80				w = $.getUrlVars(this.href)['width'] || 640;
81				return w;
82			}, 
83			innerHeight: function() {
84				h = $.getUrlVars(this.href)['height'] || 390;
85				return h;
86			},
87			opacity:  cb_opacity,
88			close:    cb_close,
89			next:     cb_next,
90			previous: cb_prev
91		});
92
93		// Vimeo
94		$("a.popup[href*='http://www.vimeo.com/'], a.popup[href*='http://vimeo.com/']").colorbox({
95			href: function() {
96				var id = /vimeo\.com\/(\d+)/.exec(this.href);  // get video id
97				url="http://player.vimeo.com/video/"+id[1];
98				if (!id[1]) url = this.href; // if no id was found return original URL
99				return url;
100			},
101			iframe:true,
102			innerWidth: function() {
103				// get width from url (if entered)
104				w = $.getUrlVars(this.href)['width'] || 640;
105				return w;
106			}, 
107			innerHeight: function() {
108				h = $.getUrlVars(this.href)['height'] || 360;
109				return h;
110			},
111			opacity:  cb_opacity,
112			close:    cb_close,
113			next:     cb_next,
114			previous: cb_prev
115		});
116		
117		// generic all links to images selector
118		$("a[href$='.jpg'],a[href$='.jpeg'],a[href$='.png'],a[href$='.gif'],a[href$='.tif'],a[href$='.tiff'],a[href$='.bmp']").colorbox({
119			maxWidth: '90%', maxHeight: '90%',
120			opacity:  cb_opacity,
121			close:    cb_close,
122			next:     cb_next,
123			previous: cb_prev
124		});
125
126		// specific target links using "popup" class with "#TartetElement" as href, for opening inline HTML content
127		$("a.popup[href$='#LoginPopup'], .popup > a[href$='#LoginPopup']").each( function() {
128			// Quick fix for URL with a path before "#LoginPopup"
129			this.href = this.hash;
130		});
131		$("a.popup[href^='#'], .popup > a[href^='#']").colorbox({ 
132			maxWidth: '90%', maxHeight: '90%', inline: true, href: this.href, 
133			opacity:  cb_opacity,
134			close:    cb_close,
135			next:     cb_next,
136			previous: cb_prev
137		}).removeClass('popup');	// remove class to prevent duplication 
138		$(".popup > a[href^='#']").parent().removeClass('popup');	// remove class (from parent for WP menu LI's) to prevent duplication 
139		
140		// specific target links using "popup" class or "#popup" in URL
141		$(".popup").colorbox({ 
142			maxWidth: '90%', maxHeight: '90%',
143			opacity:  cb_opacity,
144			close:    cb_close,
145			next:     cb_next,
146			previous: cb_prev
147		});
148		$("a[href$='#popup']").colorbox({
149			maxWidth: '90%', maxHeight: '90%',
150			href: function() { if (this.href) { return this.href.replace('#popup',''); }},
151			opacity:  cb_opacity,
152			close:    cb_close,
153			next:     cb_next,
154			previous: cb_prev
155		});
156
157		// specific target links using "iframe" class or "#iframe" in URL (non-ajax content)
158		$(".iframe").colorbox({ width:"80%", height:"80%", iframe:true });
159		$("a[href$='#iframe']").colorbox({
160			width:"80%", height:"80%", iframe:true,
161			href: function() { if (this.href) { return this.href.replace('#iframe',''); }},
162			opacity:  cb_opacity,
163			close:    cb_close,
164			next:     cb_next,
165			previous: cb_prev
166		});
167
168	};
169
170	// Docked Top Banner
171	// -------------------------------------------------------------------
172	if ( dock_topBanner && !window.mobilecheck() ) {
173		docked = false;
174		origin = $('#masthead').offset().top; // original location
175		originBottom = $('#masthead').outerHeight() + origin;
176		startDock = $('#masthead').css('padding-top');
177
178		$(window).scroll(function() {
179			$banner   = $('#masthead');
180			scroll    = $(document).scrollTop();
181			beginDock = $('#Top').offset().top + $('#Top').height(); // bottom of "#Top" section
182			topPos = parseInt($('html').css('margin-top'));
183
184			if ( !docked &&  beginDock <= scroll ) {
185				$('body').addClass('dockedNav'); 
186				$banner.css({'opacity':0, 'visibility':'visible', 'top':-$banner.height()}).stop(true).animate({ 'opacity':1, 'top': topPos + 'px' }, 500);
187				docked = true;
188			} else if ( docked && scroll <= beginDock) { 
189				$banner.stop(true).animate({ 'opacity':0, 'top':-$banner.height() }, 250, function() {
190					$('body').removeClass('dockedNav');
191					$banner.css({'top':origin, 'visibility':'visible', 'opacity':1});
192				});
193				docked = false;  
194			}
195
196			// catch all - ensure navigation at top?
197			if (scroll <= originBottom) { 
198				$('body').removeClass('dockedNav');
199				$banner.stop(true).css({'top':origin - topPos + 'px', 'visibility':'visible', 'opacity':1});
200				docked = false;  
201			}
202		});
203	}
204
205
206	// Gallery Post Format 
207	// -------------------------------------------------------------------
208
209	/**
210	 * Uses Flexslider:
211	 * https://github.com/woothemes/flexslider
212	 * 
213	 * Uses Min/Max Function: 
214	 * http://stackoverflow.com/questions/5052673/jquery-min-max-property-from-array-of-elements
215	 * 
216	 * Uses Image Load Complete Function: 
217	 * http://stackoverflow.com/questions/6488104/how-to-know-when-all-images-inside-a-specific-div-are-loaded
218	 */
219
220	// Flexslider on Gallery Post Format
221	if ( $.isFunction($.fn.flexslider) ) {
222		$('.gallery').find('.flexslider').flexslider({ 
223			animation: "fade"
224		});
225	}
226	
227	// Apply max-height slides matching smallest image (when images aren't same size)
228	// triggering handled by on_resize()
229	var fitGalleryHeight = function() {
230		$('.post-header').find('.slides').each( function() {
231
232			var $imgWrap = $(this).find('.plain-image'),
233				$imgs    = $(this).find('img'),
234				count    = $imgs.length;
235			
236			// Check for images loaded (in current slide show)
237			$imgs.load(function() {
238				count--;
239				if (!count) {
240					// Find the heights of the slide images
241					var heights = $imgs.map(function() {
242						return $(this).height() || $(this).attr('height'); // if height() returns 0 use tag attribute
243					}).get();
244
245					// Apply max-height attributs with smallest image height (take extra 1px to be safe)
246					$imgWrap.css('max-height',Math.min.apply( Math, heights )-1+'px');
247				}
248			}).filter(function() { return this.complete; }).load();
249		});
250	}
251
252
253	// jPlayer class for device controled volume (mobile)
254	// -------------------------------------------------------------------
255	$("div[id^='jquery_jplayer_']").bind($.jPlayer.event.ready, function(event) { 
256		if(event.jPlayer.status.noVolume) {
257			$("div[id^='jp_interface_']").addClass('no-volume');
258		}
259	});
260
261
262	// Filtered portfolio...
263	// -------------------------------------------------------------------
264	if ( jQuery().isotope ) {
265
266		// jQuery(function($) {
267
268			var $container = $('.isotope'),
269				optionFilter = $('#sort-by'),
270				optionFilterLinks = optionFilter.find('a'),
271				loaded = false;
272
273			// Make suer we have a filtered portfolio on the page
274			if ($container.length) {
275
276				// Setup the click filtering events
277				optionFilterLinks.attr('href', '#');
278				optionFilterLinks.click(function(){
279					
280					// After initial loading we enable transitions for filtering
281					$container.removeClass('no-transition'); 
282					
283					// Get filters
284					var selector = $(this).attr('data-filter');
285					$container.isotope({ 
286						filter : '.' + selector
287					});
288					// Highlight active filter
289					optionFilterLinks.removeClass('active');
290					$(this).addClass('active');
291
292					return false;
293				});
294
295				// Update widths for responsive (and adjust on window resize)    
296				$(window).on("portfolioResize", function( event ) {
297
298					var $windowSize = $(window).width();
299					if ($windowSize > 768) {
300						// Update item widths and margins (responsive, make multiple columns)
301						$style = $('.isotope-item').data('style');
302						$('.isotope-item').css( {
303							'width': $style.width,
304							'margin-left': $style.margin,
305							'margin-right': '0px'
306						});
307
308						// Create the grid
309						$container.isotope({
310							// transformsEnabled: false, //Disable transformations (for FF issues with YouTube)
311							resizable: true,
312							layoutMode : 'fitRows',
313							itemSelector : '.isotope-item',
314							animationEngine : 'best-available'
315						});
316					} else {
317						// Update item widths and margins (responsive, make single column)
318						$('.isotope-item').css( {
319							'width':'98%', 'margin-left':'1%', 'margin-right':'1%'
320						});
321
322						// Create the grid
323						$container.isotope({
324							resizable: false,  // disable resizing
325							layoutMode: 'masonry',
326							masonry: {
327								columnWidth: $container.width() // for two columns use: $container.width() / 2
328							}
329						});
330					};  
331				}); //.smartresize();
332
333				// after media loads, trigger the portfolio resize once manually
334				$container.find('img').load(function() {
335					$(window).trigger( "portfolioResize" );
336				});
337
338			}
339
340		// });
341	}
342
343
344	// Wrap Call to Action in .shadow-curl effect
345	// -------------------------------------------------------------------
346	$('.wpb_call_to_action').wrap('<div class="call-to-action shadow-curl styled-image">');
347	$('section.vc_cta3-container .vc_cta3').wrap('<div class="call-to-action shadow-curl styled-image">');
348
349
350	// Parallax container helper
351	// -------------------------------------------------------------------
352	
353	// Add helper classes for older browsers
354	$('.lt-ie9').find('.vc_section_wrapper').first().addClass('first');
355
356	// Adds a height to parallax image layers. This helps in full width layouts where the layer is unbound from the parent container by absolute positioning.
357	$(window).on("parallaxHeight click", function( event ) {
358		$('.vc_section_wrapper').each( function() {
359			$(this).children('.bg-layer').first().css('height', $(this).outerHeight() + 'px');
360		});
361	}); 
362	// Trigger once more after short delat 
363	window.setTimeout('jQuery(window).trigger("parallaxHeight")',500);
364	
365	// Load parallax effect on element
366	$('.parallax-section .bg-layer').each( function() {
367		$(this).parallaxScroll({ inertia : parseFloat($(this).attr('data-inertia')) });
368	});
369
370
371
372	// Initialize events we want bound to the window resize event
373	// -------------------------------------------------------------------
374	on_resize(function() {
375
376		fitGalleryHeight();
377
378		if ( $('.navRight .ubermenu-nav').length && $('#TopContent').width() >= 768 ) {
379			uberFitRight(); 
380		}
381
382		$(window).trigger( "portfolioResize" );
383
384	})();  // extra () triggers once to start
385
386
387});
388
389
390
391/* Utilitles 
392=======================================================================*/
393
394
395// debulked onresize handler. This stops excessive resize triggering.
396// -------------------------------------------------------------------
397function on_resize(c,t){onresize=function(){clearTimeout(t);t=setTimeout(c,100)};return c};
398
399
400// HTML5 input placeholders
401// -------------------------------------------------------------------
402/* HTML5 placeholder plugin (v1.01), Copyright (c) 2010-The End of Time, Mike Taylor, http://miketaylr.com, MIT Licensed: http://www.opensource.org/licenses/mit-license.php
403 * Fixes HTML5 placeholder text for older browsers - USAGE:  $('input[placeholder]').placeholder();
404 */
405(function(a){var b="placeholder"in document.createElement("input"),c=a.browser.opera&&a.browser.version<10.5;a.fn.placeholder=function(d){var d=a.extend({},a.fn.placeholder.defaults,d),e=d.placeholderCSS.left;return b?this:this.each(function(){var b=a(this),f=a.trim(b.val()),g=b.width(),h=b.height(),i=this.id?this.id:"placeholder"+ +(new Date),j=b.attr("placeholder"),k=a("<label for="+i+">
405"+j+"</label>");d.placeholderCSS.width=g,d.placeholderCSS.height=h,d.placeholderCSS.color=d.color,d.placeholderCSS.left=!c||this.type!="email"&&this.type!="url"?e:"11%",k.css(d.placeholderCSS),b.wrap(d.inputWrapper),b.attr("id",i).after(k),f&&k.hide(),b.focus(function(){a.trim(b.val())||k.hide()}),b.blur(function(){a.trim(b.val())||k.show()})})},a.fn.placeholder.defaults={inputWrapper:'<span style="position:relative; display:block;" class="placeholder-text"></span>',placeholderCSS:{font:"1em",color:"#bababa",position:"absolute",left:"5px",top:"3px","overflow":"hidden",display:"block"}}})(jQuery);
406// activate placeholders
407jQuery('input[placeholder], textarea[placeholder]').placeholder();
408
409
410// Get parameters from URL or string
411// -------------------------------------------------------------------
412// Usage: 	Get object of URL parameters:	allVars = $.getUrlVars();
413// 			Getting URL var by its name:	byName = $.getUrlVar('name');
414// 			Getting alternate URL var:		customURL = $.getUrlVar('name','http://mysite.com/?query=string');
415// -------------------------------------------------------------------
416jQuery.extend({getUrlVars:function(url){var vars=[],hash;if(!url){url=window.location.href;}var hashes=url.slice(window.location.href.indexOf("?")+1).split("&");for(var i=0;i<hashes.length;i++){hash=hashes[i].split("=");vars.push(hash[0]);vars[hash[0]]=hash[1];}return vars;},getUrlVar:function(name,url){if(!url){url=window.location.href;}return jQuery.getUrlVars(url)[name];}});
417
418
419/* jQuery fitvids - responsive video embeds */
420(function(a){"use strict";a.fn.fitVids=function(b){var c={customSelector:null},d=document.createElement("div"),e=document.getElementsByTagName("base")[0]||document.getElementsByTagName("script")[0];return d.className="fit-vids-style",d.innerHTML="&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>",e.parentNode.insertBefore(d,e),b&&a.extend(c,b),this.each(function(){var b=["iframe[src*='player.vimeo.com']","iframe[src*='youtube.com']","iframe[src*='youtube-nocookie.com']","iframe[src*='kickstarter.com']","object","embed"];c.customSelector&&b.push(c.customSelector);var d=a(this).find(b.join(","));d.each(function(){var b=a(this);if(!("embed"===this.tagName.toLowerCase()&&b.parent("object").length||b.parent(".fluid-width-video-wrapper").length)){var c="object"===this.tagName.toLowerCase()||b.attr("height")&&!isNaN(parseInt(b.attr("height"),10))?parseInt(b.attr("height"),10):b.height(),d=isNaN(parseInt(b.attr("width"),10))?b.width():parseInt(b.attr("width"),10),e=c/d;if(!b.attr("id")){var f="fitvid"+Math.floor(999999*Math.random());b.attr("id",f)}b.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",100*e+"%"),b.removeAttr("height").removeAttr("width")}})})}})(jQuery);
421
422
423/*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs  */
424(function(e){e.respond={};respond.update=function(){};respond.mediaQueriesSupported=e.matchMedia&&e.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var w=e.document,s=w.documentElement,i=[],k=[],q=[],o={},h=30,f=w.getElementsByTagName("head")[0]||s,g=w.getElementsByTagName("base")[0],b=f.getElementsByTagName("link"),d=[],a=function(){var D=b,y=D.length,B=0,A,z,C,x;for(;B<y;B++){A=D[B],z=A.href,C=A.media,x=A.rel&&A.rel.toLowerCase()==="stylesheet";if(!!z&&x&&!o[z]){if(A.styleSheet&&A.styleSheet.rawCssText){m(A.styleSheet.rawCssText,z,C);o[z]=true}else{if((!/^([a-zA-Z:]*\/\/)/.test(z)&&!g)||z.replace(RegExp.$1,"").split("/")[0]===e.location.host){d.push({href:z,media:C})}}}}u()},u=function(){if(d.length){var x=d.shift();n(x.href,function(y){m(y,x.href,x.media);o[x.href]=true;u()})}},m=function(I,x,z){var G=I.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi),J=G&&G.length||0,x=x.substring(0,x.lastIndexOf("/")),y=function(K){return K.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+x+"$2$3")},A=!J&&z,D=0,C,E,F,B,H;if(x.length){x+="/"}if(A){J=1}for(;D<J;D++){C=0;if(A){E=z;k.push(y(I))}else{E=G[D].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1;k.push(RegExp.$2&&y(RegExp.$2))}B=E.split(",");H=B.length;for(;C<H;C++){F=B[C];i.push({media:F.split("(")[0].match(/(only\s+)?([a-zA-Z]+)\s?/)&&RegExp.$2||"all",rules:k.length-1,hasquery:F.indexOf("(")>-1,minw:F.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:F.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}j()},l,r,v=function(){var z,A=w.createElement("div"),x=w.body,y=false;A.style.cssText="position:absolute;font-size:1em;width:1em";if(!x){x=y=w.createElement("body");x.style.background="none"}x.appendChild(A);
424s.insertBefore(x,s.firstChild);z=A.offsetWidth;if(y){s.removeChild(x)}else{x.removeChild(A)}z=p=parseFloat(z);return z},p,j=function(I){var x="clientWidth",B=s[x],H=w.compatMode==="CSS1Compat"&&B||w.body[x]||B,D={},G=b[b.length-1],z=(new Date()).getTime();if(I&&l&&z-l<h){clearTimeout(r);r=setTimeout(j,h);return}else{l=z}for(var E in i){var K=i[E],C=K.minw,J=K.maxw,A=C===null,L=J===null,y="em";if(!!C){C=parseFloat(C)*(C.indexOf(y)>-1?(p||v()):1)}if(!!J){J=parseFloat(J)*(J.indexOf(y)>-1?(p||v()):1)}if(!K.hasquery||(!A||!L)&&(A||H>=C)&&(L||H<=J)){if(!D[K.media]){D[K.media]=[]}D[K.media].push(k[K.rules])}}for(var E in q){if(q[E]&&q[E].parentNode===f){f.removeChild(q[E])}}for(var E in D){var M=w.createElement("style"),F=D[E].join("\n");M.type="text/css";M.media=E;f.insertBefore(M,G.nextSibling);if(M.styleSheet){M.styleSheet.cssText=F}else{M.appendChild(w.createTextNode(F))}q.push(M)}},n=function(x,z){var y=c();if(!y){return}y.open("GET",x,true);y.onreadystatechange=function(){if(y.readyState!=4||y.status!=200&&y.status!=304){return}z(y.responseText)};if(y.readyState==4){return}y.send(null)},c=(function(){var x=false;try{x=new XMLHttpRequest()}catch(y){x=new ActiveXObject("Microsoft.XMLHTTP")}return function(){return x}})();a();respond.update=a;function t(){j(true)}if(e.addEventListener){e.addEventListener("resize",t,false)}else{if(e.attachEvent){e.attachEvent("onresize",t)}}})(this);
425
426/* Parallax - Custom developed by Parallelus */
427(function($){$.fn.parallaxScroll=function(options){var settings={adjuster:0,inertia:0.1,type:"background"};if(options){$.extend(settings,options);}this.each(function(){var $this=$(this);if(settings.type=="background"){var objPos="";objPos=/[^\s]+/.exec($this.css("background-position"));if(objPos=="undefined"){objPos="50%";}var objX=(!objPos||objPos=="undefined")?"50%":objPos;}else{$this.css("position","absolute");$this.parent().css("position","relative");var objTop=Math.floor($this.position().top);var startTop=objTop;}$(window).bind("scroll resize",function(){var scrollPos=$(window).scrollTop();var elementTop=($this.offset())?$this.offset().top:0;if(isScrolledIntoView($this)){if(settings.type=="background"){var x=objX;var y=Math.round((((elementTop-scrollPos)*settings.inertia))+settings.adjuster)+"px";$this.css({"background-position":x+" "+y});}else{var elementTop=($this.parent().offset())?$this.parent().offset().top:0;var newTop=Math.round(((-(elementTop-scrollPos)*settings.inertia))+settings.adjuster+(elementTop*settings.inertia)+objTop)+"px";$this.css({"top":newTop});}}});$this.trigger("scroll");});function isScrolledIntoView(elem){var viewTop=$(window).scrollTop();var viewBottom=viewTop+$(window).height();var elemTop=$(elem).offset().top;var elemBottom=elemTop+$(elem).height();return((elemBottom>=viewTop)&&(elemTop<=viewBottom));}};})(jQuery);
428
429// Mobile browser check
430// Note: Slightly modified to include iPad
431// Source: http://stackoverflow.com/questions/11381673/javascript-solution-to-detect-mobile-browser
432window.mobilecheck = function() {
433var check = false;
434(function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|
434sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))check = true})(navigator.userAgent||navigator.vendor||window.opera);
435return check; };
436
437
438//	jQuery Colorbox v1.4.14 - 2013-04-16
439//	(c) 2013 Jack Moore - jacklmoore.com/colorbox
440//	license: http://www.opensource.org/licenses/mit-license.php
441(function(t,e,i){function o(i,o,n){var r=e.createElement(i);return o&&(r.id=te+o),n&&(r.style.cssText=n),t(r)}function n(){return i.innerHeight?i.innerHeight:t(i).height()}function r(t){var e=H.length,i=(j+t)%e;return 0>i?e+i:i}function h(t,e){return Math.round((/%/.test(t)?("x"===e?E.width():n())/100:1)*parseInt(t,10))}function l(t,e){return t.photo||t.photoRegex.test(e)}function s(t,e){return t.retinaUrl&&i.devicePixelRatio>1?e.replace(t.photoRegex,t.retinaSuffix):e}function a(t){"contains"in x[0]&&!x[0].contains(t.target)&&(t.stopPropagation(),x.focus())}function d(){var e,i=t.data(A,Z);null==i?(_=t.extend({},Y),console&&console.log&&console.log("Error: cboxElement missing settings object")):_=t.extend({},i);for(e in _)t.isFunction(_[e])&&"on"!==e.slice(0,2)&&(_[e]=_[e].call(A));_.rel=_.rel||A.rel||t(A).data("rel")||"nofollow",_.href=_.href||t(A).attr("href"),_.title=_.title||A.title,"string"==typeof _.href&&(_.href=t.trim(_.href))}function c(i,o){t(e).trigger(i),se.trigger(i),t.isFunction(o)&&o.call(A)}function u(){var t,e,i,o,n,r=te+"Slideshow_",h="click."+te;_.slideshow&&H[1]?(e=function(){clearTimeout(t)},i=function(){(_.loop||H[j+1])&&(t=setTimeout(J.next,_.slideshowSpeed))},o=function(){M.html(_.slideshowStop).unbind(h).one(h,n),se.bind(ne,i).bind(oe,e).bind(re,n),x.removeClass(r+"off").addClass(r+"on")},n=function(){e(),se.unbind(ne,i).unbind(oe,e).unbind(re,n),M.html(_.slideshowStart).unbind(h).one(h,function(){J.next(),o()}),x.removeClass(r+"on").addClass(r+"off")},_.slideshowAuto?o():n()):x.removeClass(r+"off "+r+"on")}function f(i){G||(A=i,d(),H=t(A),j=0,"nofollow"!==_.rel&&(H=t("."+ee).filter(function(){var e,i=t.data(this,Z);return i&&(e=t(this).data("rel")||i.rel||this.rel),e===_.rel}),j=H.index(A),-1===j&&(H=H.add(A),j=H.length-1)),g.css({opacity:parseFloat(_.opacity),cursor:_.overlayClose?"pointer":"auto",visibility:"visible"}).show(),V&&x.add(g).removeClass(V),_.className&&x.add(g).addClass(_.className),V=_.className,K.html(_.close).show(),$||($=q=!0,x.css({visibility:"hidden",display:"block"}),W=o(ae,"LoadedContent","width:0; height:0; overflow:hidden").appendTo(v),D=b.height()+k.height()+v.outerHeight(!0)-v.height(),B=C.width()+T.width()+v.outerWidth(!0)-v.width(),N=W.outerHeight(!0),z=W.outerWidth(!0),_.w=h(_.initialWidth,"x"),_.h=h(_.initialHeight,"y"),J.position(),u(),c(ie,_.onOpen),O.add(F).hide(),x.focus(),e.addEventListener&&(e.addEventListener("focus",a,!0),se.one(he,function(){e.removeEventListener("focus",a,!0)})),_.returnFocus&&se.one(he,function(){t(A).focus()})),w())}function p(){!x&&e.body&&(X=!1,E=t(i),x=o(ae).attr({id:Z,"class":t.support.opacity===!1?te+"IE":"",role:"dialog",tabindex:"-1"}).hide(),g=o(ae,"Overlay").hide(),S=o(ae,"LoadingOverlay").add(o(ae,"LoadingGraphic")),y=o(ae,"Wrapper"),v=o(ae,"Content").append(F=o(ae,"Title"),I=o(ae,"Current"),P=t('<button type="button"/>').attr({id:te+"Previous"}),R=t('<button type="button"/>').attr({id:te+"Next"}),M=o("button","Slideshow"),S,K=t('<button type="button"/>').attr({id:te+"Close"})),y.append(o(ae).append(o(ae,"TopLeft"),b=o(ae,"TopCenter"),o(ae,"TopRight")),o(ae,!1,"clear:left").append(C=o(ae,"MiddleLeft"),v,T=o(ae,"MiddleRight")),o(ae,!1,"clear:left").append(o(ae,"BottomLeft"),k=o(ae,"BottomCenter"),o(ae,"BottomRight"))).find("div div").css({"float":"left"}),L=o(ae,!1,"position:absolute; width:9999px; visibility:hidden; display:none"),O=R.add(P).add(I).add(M),t(e.body).append(g,x.append(y,L)))}function m(){function i(t){t.which>1||t.shiftKey||t.altKey||t.metaKey||t.control||(t.preventDefault(),f(this))}return x?(X||(X=!0,R.click(function(){J.next()}),P.click(function(){J.prev()}),K.click(function(){J.close()}),g.click(function(){_.overlayClose&&J.close()}),t(e).bind("keydown."+te,function(t){var e=t.keyCode;$&&_.escKey&&27===e&&(t.preventDefault(),J.close()),$&&_.arrowKey&&H[1]&&!t.altKey&&
441(37===e?(t.preventDefault(),P.click()):39===e&&(t.preventDefault(),R.click()))}),t.isFunction(t.fn.on)?t(e).on("click."+te,"."+ee,i):t("."+ee).live("click."+te,i)),!0):!1}function w(){var e,n,r,a=J.prep,u=++de;q=!0,U=!1,A=H[j],d(),c(le),c(oe,_.onLoad),_.h=_.height?h(_.height,"y")-N-D:_.innerHeight&&h(_.innerHeight,"y"),_.w=_.width?h(_.width,"x")-z-B:_.innerWidth&&h(_.innerWidth,"x"),_.mw=_.w,_.mh=_.h,_.maxWidth&&(_.mw=h(_.maxWidth,"x")-z-B,_.mw=_.w&&_.w<_.mw?_.w:_.mw),_.maxHeight&&(_.mh=h(_.maxHeight,"y")-N-D,_.mh=_.h&&_.h<_.mh?_.h:_.mh),e=_.href,Q=setTimeout(function(){S.show()},100),_.inline?(r=o(ae).hide().insertBefore(t(e)[0]),se.one(le,function(){r.replaceWith(W.children())}),a(t(e))):_.iframe?a(" "):_.html?a(_.html):l(_,e)?(e=s(_,e),t(U=new Image).addClass(te+"Photo").bind("error",function(){_.title=!1,a(o(ae,"Error").html(_.imgError))}).one("load",function(){var e;u===de&&(U.alt=t(A).attr("alt")||t(A).attr("data-alt")||"",_.retinaImage&&i.devicePixelRatio>1&&(U.height=U.height/i.devicePixelRatio,U.width=U.width/i.devicePixelRatio),_.scalePhotos&&(n=function(){U.height-=U.height*e,U.width-=U.width*e},_.mw&&U.width>_.mw&&(e=(U.width-_.mw)/U.width,n()),_.mh&&U.height>_.mh&&(e=(U.height-_.mh)/U.height,n())),_.h&&(U.style.marginTop=Math.max(_.mh-U.height,0)/2+"px"),H[1]&&(_.loop||H[j+1])&&(U.style.cursor="pointer",U.onclick=function(){J.next()}),U.style.width=U.width+"px",U.style.height=U.height+"px",setTimeout(function(){a(U)},1))}),setTimeout(function(){U.src=e},1)):e&&L.load(e,_.data,function(e,i){u===de&&a("error"===i?o(ae,"Error").html(_.xhrError):t(this).contents())})}var g,x,y,v,b,C,T,k,H,E,W,L,S,F,I,M,R,P,K,O,_,D,B,N,z,A,j,U,$,q,G,Q,J,V,X,Y={transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,inline:!1,html:!1,iframe:!1,fastIframe:!0,photo:!1,href:!1,title:!1,rel:!1,opacity:.9,preloading:!0,className:!1,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",open:!1,returnFocus:!0,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico)((#|\?).*)?$/i,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0},Z="colorbox",te="cbox",ee=te+"Element",ie=te+"_open",oe=te+"_load",ne=te+"_complete",re=te+"_cleanup",he=te+"_closed",le=te+"_purge",se=t("<a/>"),ae="div",de=0;t.colorbox||(t(p),J=t.fn[Z]=t[Z]=function(e,i){var o=this;if(e=e||{},p(),m()){if(t.isFunction(o))o=t("<a/>"),e.open=!0;else if(!o[0])return o;i&&(e.onComplete=i),o.each(function(){t.data(this,Z,t.extend({},t.data(this,Z)||Y,e))}).addClass(ee),(t.isFunction(e.open)&&e.open.call(o)||e.open)&&f(o[0])}return o},J.position=function(t,e){function i(t){b[0].style.width=k[0].style.width=v[0].style.width=parseInt(t.style.width,10)-B+"px",v[0].style.height=C[0].style.height=T[0].style.height=parseInt(t.style.height,10)-D+"px"}var o,r,l,s=0,a=0,d=x.offset();E.unbind("resize."+te),x.css({top:-9e4,left:-9e4}),r=E.scrollTop(),l=E.scrollLeft(),_.fixed?(d.top-=r,d.left-=l,x.css({position:"fixed"})):(s=r,a=l,x.css({position:"absolute"})),a+=_.right!==!1?Math.max(E.width()-_.w-z-B-h(_.right,"x"),0):_.left!==!1?h(_.left,"x"):Math.round(Math.max(E.width()-_.w-z-B,0)/2),s+=_.bottom!==!1?Math.max(n()-_.h-N-D-h(_.bottom,"y"),0):_.top!==!1?h(_.top,"y"):Math.round(Math.max(n()-_.h-N-D,0)/2),x.css({top:d.top,left:d.left,visibility:"visible"}),t=x.width()===_.w+z&&x.height()===_.h+N?0:t||0,y[0].style.width=y[0].style.height="9999px",o={width:_.w+z+B,height:_.h+N+D,top:s,left:a},0===t&&x.css(o),x.dequeue().animate(o,{duration:t,complete:function(){i(this),q=!1,y[0].style.width=_.w+z+B+"px",y[0].style.height=_.h+N+D+"px",_.reposition&&setTimeout(function(){E.bind("resize."+te,J.position)},1),e&&e()},step:function(){i(this)}})},J.resize=function(t){$&&(t=t||{},t.width&&(_.w=h(t.width,"x")-z-B),t.innerWidth&&(_.w=h(t.innerWidth,"x")),W.css({width:_.w}
441),t.height&&(_.h=h(t.height,"y")-N-D),t.innerHeight&&(_.h=h(t.innerHeight,"y")),t.innerHeight||t.height||(W.css({height:"auto"}),_.h=W.height()),W.css({height:_.h}),J.position("none"===_.transition?0:_.speed))},J.prep=function(e){function i(){return _.w=_.w||W.width(),_.w=_.mw&&_.mw<_.w?_.mw:_.w,_.w}function n(){return _.h=_.h||W.height(),_.h=_.mh&&_.mh<_.h?_.mh:_.h,_.h}if($){var h,a="none"===_.transition?0:_.speed;W.empty().remove(),W=o(ae,"LoadedContent").append(e),W.hide().appendTo(L.show()).css({width:i(),overflow:_.scrolling?"auto":"hidden"}).css({height:n()}).prependTo(v),L.hide(),t(U).css({"float":"none"}),h=function(){function e(){t.support.opacity===!1&&x[0].style.removeAttribute("filter")}var i,n,h=H.length,d="frameBorder",u="allowTransparency";$&&(n=function(){clearTimeout(Q),S.hide(),c(ne,_.onComplete)},F.html(_.title).add(W).show(),h>1?("string"==typeof _.current&&I.html(_.current.replace("{current}",j+1).replace("{total}",h)).show(),R[_.loop||h-1>j?"show":"hide"]().html(_.next),P[_.loop||j?"show":"hide"]().html(_.previous),_.slideshow&&M.show(),_.preloading&&t.each([r(-1),r(1)],function(){var e,i,o=H[this],n=t.data(o,Z);n&&n.href?(e=n.href,t.isFunction(e)&&(e=e.call(o))):e=t(o).attr("href"),e&&l(n,e)&&(e=s(n,e),i=new Image,i.src=e)})):O.hide(),_.iframe?(i=o("iframe")[0],d in i&&(i[d]=0),u in i&&(i[u]="true"),_.scrolling||(i.scrolling="no"),t(i).attr({src:_.href,name:(new Date).getTime(),"class":te+"Iframe",allowFullScreen:!0,webkitAllowFullScreen:!0,mozallowfullscreen:!0}).one("load",n).appendTo(W),se.one(le,function(){i.src="//about:blank"}),_.fastIframe&&t(i).trigger("load")):n(),"fade"===_.transition?x.fadeTo(a,1,e):e())},"fade"===_.transition?x.fadeTo(a,0,function(){J.position(0,h)}):J.position(a,h)}},J.next=function(){!q&&H[1]&&(_.loop||H[j+1])&&(j=r(1),f(H[j]))},J.prev=function(){!q&&H[1]&&(_.loop||j)&&(j=r(-1),f(H[j]))},J.close=function(){$&&!G&&(G=!0,$=!1,c(re,_.onCleanup),E.unbind("."+te),g.fadeTo(_.fadeOut||0,0),x.stop().fadeTo(_.fadeOut||0,0,function(){x.add(g).css({opacity:1,cursor:"auto"}).hide(),c(le),W.empty().remove(),setTimeout(function(){G=!1,c(he,_.onClosed)},1)}))},J.remove=function(){x&&(x.stop(),t.colorbox.close(),x.stop().remove(),g.remove(),G=!1,x=null,t("."+ee).removeData(Z).removeClass(ee),t(e).unbind("click."+te))},J.element=function(){return t(A)},J.settings=Y)})(jQuery,document,window);

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.