1/* 2 * jPreloader 3*/ 4 5(function(a){var b=new Array,c=new Array,d=function(){},e=0;var f={splashVPos:"35%",loaderVPos:"75%",splashID:"#jpreContent",showSplash:true,showPercentage:true,autoClose:true,closeBtnText:"Start!",onetimeLoad:false,debugMode:false,splashFunction:function(){}};var g=function(){if(f.onetimeLoad){var a=document.cookie.split("; ");for(var b=0,c;c=a[b]&&a[b].split("=");b++){if(c.shift()==="jpreLoader"){return c.join("=")}}return false}else{return false}};var h=function(a){if(f.onetimeLoad){var b=new Date;b.setDate(b.getDate()+a);var c=a==null?"":"expires="+b.toUTCString();document.cookie="jpreLoader=loaded; "+c}};var i=function(){jOverlay=a("<div></div>").attr("id","jpreOverlay").css({position:"fixed",top:0,left:0,width:"100%",height:"100%",zIndex:9999999}).appendTo("body");if(f.showSplash){jContent=a("<div></div>").attr("id","jpreSlide").appendTo(jOverlay);var b=a(window).width()-a(jContent).width();a(jContent).css({position:"absolute",top:f.splashVPos,left:Math.round(50/a(window).width()*b)+"%"});a(jContent).html(a(f.splashID).wrap("<div/>").parent().html());a(f.splashID).remove();f.splashFunction()}jLoader=a("<div></div>").attr("id","jpreLoader").appendTo(jOverlay);var c=a(window).width()-a(jLoader).width();a(jLoader).css({position:"absolute",top:f.loaderVPos,left:Math.round(50/a(window).width()*c)+"%"});jBar=a("<div></div>").attr("id","jpreBar").css({width:"0%",height:"100%"}).appendTo(jLoader);if(f.showPercentage){jPer=a("<div></div>").attr("id","jprePercentage").css({position:"relative",height:"100%"}).appendTo(jLoader).html("")}if(!f.autoclose){jButton=a("<div></div>").attr("id","jpreButton").on("click",function(){n()}).css({position:"relative",height:"100%"}).appendTo(jLoader).text(f.closeBtnText).hide()}};var j=function(c){a(c).find("*:not(script)").each(function(){var c="";if(a(this).css("background-image").indexOf("none")==-1&&a(this).css("background-image").indexOf("-gradient")==-1){c=a(this).css("background-image");if(c.indexOf("url")!=-1){var d=c.match(/url\((.*?)\)/);c=d[1].replace(/\"/g,"")}}else if(a(this).get(0).nodeName.toLowerCase()=="img"&&typeof a(this).attr("src")!="undefined"){c=a(this).attr("src")}if(c.length>0){b.push(c)}})};var k=function(){for(var a=0;a<b.length;a++){if(l(b[a]));}};var l=function(b){var d=new Image;a(d).load(function(){m()}).error(function(){c.push(a(this).attr("src"));m()}).attr("src",b)};var m=function(){e++;var c=Math.round(e/b.length*100);a(jBar).stop().animate({width:c+"%"},500,"linear");if(f.showPercentage){a(jPer).text(c)}if(e>=b.length){e=b.length;h();if(f.showPercentage){a(jPer).text("100")}if(f.debugMode){var d=o()}a(jBar).stop().animate({width:"100%"},500,"linear",function(){if(f.autoClose)n();else a(jButton).fadeIn(1e3)})}};var n=function(){a(jOverlay).fadeOut(800,function(){a(jOverlay).remove();d()})};var o=function(){if(c.length>0){var a="ERROR - IMAGE FILES MISSING!!!\n\r";a+=c.length+" image files cound not be found. \n\r";a+="Please check your image paths and filenames:\n\r";for(var b=0;b<c.length;b++){a+="- "+c[b]+"\n\r"}return true}else{return false}};a.fn.jpreLoader=function(b,c){if(b){a.extend(f,b)}if(typeof c=="function"){d=c}a("body").css({display:"block"});return this.each(function(){if(!g()){i();j(this);k()}else{a(f.splashID).remove();d()}})}})(jQuery) 6 7/* 8 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ 9*/ 10 11jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return -(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e},easeOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return g*Math.pow(2,-10*h)*Math.sin((h*k-i)*(2*Math.PI)/j)+l+e},easeInOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k/2)==2){return e+l}if(!j){j=k*(0.3*1.5)}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}if(h<1){return -0.5*(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e}return g*Math.pow(2,-10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j)*0.5+l+e},easeInBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*(f/=h)*f*((g+1)*f-g)+a},easeOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*((f=f/h-1)*f*((g+1)*f+g)+1)+a},easeInOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}if((f/=h/2)<1){return i/2*(f*f*(((g*=(1.525))+1)*f-g))+a}return i/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+a},easeInBounce:function(e,f,a,h,g){return h-jQuery.easing.easeOutBounce(e,g-f,0,h,g)+a},easeOutBounce:function(e,f,a,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+a}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+a}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+a}else{return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+a}}}},easeInOutBounce:function(e,f,a,h,g){if(f<g/2){return jQuery.easing.easeInBounce(e,f*2,0,h,g)*0.5+a}return jQuery.easing.easeOutBounce(e,f*2-g,0,h,g)*0.5+h*0.5+a}}); 12 13/** 14 15 * jQuery ScrollTo 16 17 * Copyright (c) 2007-2012 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com 18 19 * Dual licensed under MIT and GPL. 20 21 * @author Ariel Flesler 22 23 * @version 1.4.3 24 25 */ 26 27;(function($){var h=$.scrollTo=function(a,b,c){$(window).scrollTo(a,b,c)};h.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1,limit:true};h.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return/webkit/i.test(navigator.userAgent)||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(e,f,g){if(typeof f=='object'){g=f;f=0}if(typeof g=='function')g={onAfter:g};if(e=='max')e=9e9;g=$.extend({},h.defaults,g);f=f||g.duration;g.queue=g.queue&&g.axis.length>1;if(g.queue)f/=2;g.offset=both(g.offset);g.over=both(g.over);return this._scrollable().each(function(){if(!e)return;var d=this,$elem=$(d),targ=e,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=$(targ,this);if(!targ.length)return;case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}$.each(g.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=h.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(g.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=g.offset[pos]||0;if(g.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*g.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(g.limit&&/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&g.queue){if(old!=attr[key])animate(g.onAfterFirst);delete attr[key]}});animate(g.onAfter);function animate(a){$elem.animate(attr,f,g.easing,a&&function(){a.call(this,e,g)})}}).end()};h.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery); 28 29 30/* 31 * jQuery One Page Nav Plugin 32 * http://github.com/davist11/jQuery-One-Page-Nav 33 * 34 * Copyright (c) 2010 Trevor Davis (http://trevordavis.net) 35 * Dual licensed under the MIT and GPL licenses. 36 * Uses the same license as jQuery, see: 37 * http://jquery.org/license 38 * 39 * @version 2.1 40 * 41 * Example usage: 42 * $('#nav').onePageNav({ 43 * currentClass: 'current', 44 * changeHash: false, 45 * scrollSpeed: 750 46 * }); 47 */ 48 49;(function($, window, document, undefined){ 50 51// our plugin constructor 52var OnePageNav = function(elem, options){ 53this.elem = elem; 54this.$elem = $(elem); 55this.options = options; 56this.metadata = this.$elem.data('plugin-options'); 57this.$nav = this.$elem.find('a'); 58this.$win = $(window); 59this.sections = {}; 60this.didScroll = false;
61this.$doc = $(document); 62this.docHeight = this.$doc.height(); 63}; 64 65// the plugin prototype 66OnePageNav.prototype = { 67defaults: { 68currentClass: 'current', 69changeHash: false, 70easing: 'swing', 71filter: '', 72scrollSpeed: 750, 73scrollOffset: 0, 74scrollThreshold: 0.5, 75begin: false, 76end: false, 77scrollChange: false 78}, 79 80init: function() { 81var self = this; 82 83// Introduce defaults that can be extended either 84// globally or using an object literal. 85self.config = $.extend({}, self.defaults, self.options, self.metadata); 86 87//Filter any links out of the nav 88if(self.config.filter !== '') { 89self.$nav = self.$nav.filter(self.config.filter); 90} 91 92//Handle clicks on the nav 93self.$nav.on('click.onePageNav', $.proxy(self.handleClick, self)); 94 95//Get the section positions 96self.getPositions(); 97 98//Handle scroll changes 99self.bindInterval(); 100 101//Update the positions on resize too 102self.$win.on('resize.onePageNav', $.proxy(self.getPositions, self)); 103 104return this; 105}, 106 107adjustNav: function(self, $parent) { 108self.$elem.find('.' + self.config.currentClass).removeClass(self.config.currentClass); 109$parent.addClass(self.config.currentClass); 110}, 111 112bindInterval: function() { 113var self = this; 114var docHeight; 115 116self.$win.on('scroll.onePageNav', function() { 117self.didScroll = true; 118}); 119 120self.t = setInterval(function() { 121docHeight = self.$doc.height(); 122 123//If it was scrolled 124if(self.didScroll) { 125self.didScroll = false; 126self.scrollChange(); 127} 128 129//If the document height changes 130if(docHeight !== self.docHeight) { 131self.docHeight = docHeight; 132self.getPositions(); 133} 134}, 250); 135}, 136 137getHash: function($link) { 138return $link.attr('href').split('#')[1]; 139}, 140 141getPositions: function() { 142var self = this; 143var linkHref; 144var topPos; 145var $target; 146 147self.$nav.each(function() { 148linkHref = self.getHash($(this)); 149$target = $('#' + linkHref); 150 151if($target.length) { 152topPos = $target.offset().top; 153self.sections[linkHref] = Math.round(topPos) - self.config.scrollOffset; 154} 155}); 156}, 157 158getSection: function(windowPos) { 159var returnValue = null; 160var windowHeight = Math.round(this.$win.height() * this.config.scrollThreshold); 161 162for(var section in this.sections) { 163if((this.sections[section] - windowHeight) < windowPos) { 164returnValue = section; 165} 166} 167 168return returnValue; 169}, 170 171handleClick: function(e) { 172var self = this; 173var $link = $(e.currentTarget); 174var $parent = $link.parent(); 175var newLoc = '#' + self.getHash($link); 176 177if(!$parent.hasClass(self.config.currentClass)) { 178//Start callback 179if(self.config.begin) { 180self.config.begin(); 181} 182 183//Change the highlighted nav item 184self.adjustNav(self, $parent); 185 186//Removing the auto-adjust on scroll 187self.unbindInterval(); 188 189//Scroll to the correct position 190$.scrollTo(newLoc, self.config.scrollSpeed, { 191axis: 'y', 192easing: self.config.easing, 193offset: { 194top: -self.config.scrollOffset 195}, 196onAfter: function() { 197//Do we need to change the hash? 198if(self.config.changeHash) { 199window.location.hash = newLoc; 200} 201 202//Add the auto-adjust on scroll back in 203self.bindInterval(); 204 205//End callback 206if(self.config.end) { 207self.config.end(); 208} 209} 210}); 211} 212 213e.preventDefault(); 214}, 215 216scrollChange: function() { 217var windowTop = this.$win.scrollTop(); 218var position = this.getSection(windowTop); 219var $parent; 220 221//If the position is set 222if(position !== null) { 223$parent = this.$elem.find('a[href$="#' + position + '"]').parent(); 224 225//If it's not already the current section 226if(!$parent.hasClass(this.config.currentClass)) { 227//Change the highlighted nav item 228this.adjustNav(this, $parent); 229 230//If there is a scrollChange callback 231if(this.config.scrollChange) { 232this.config.scrollChange($parent); 233} 234} 235} 236}, 237 238unbindInterval: function() { 239clearInterval(this.t); 240this.$win.unbind('scroll.onePageNav'); 241} 242}; 243 244OnePageNav.defaults = OnePageNav.prototype.defaults; 245 246$.fn.onePageNav = function(options) { 247return this.each(function() { 248new OnePageNav(this, options).init(); 249}); 250}; 251 252})( jQuery, window , document );
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.