PageSourceSearch

https://trinityloft.com/includes/revealFX/RevealFX.js

js trinityloft.com collected 2026-10-04 05:19:33 UTC 30,498 bytes, 634 lines download raw bytes

vendor: 7,629 bytes, lines 1-61
1(function($) {
2
3    /* Modernizr 2.7.1 (Custom Build) | MIT & BSD
4     * Build: http://modernizr.com/download/#-csstransitions-testprop-testallprops-domprefixes-load
5     */
6    ;window.Modernizr=function(a,b,c){function w(a){i.cssText=a}function x(a,b){return w(prefixes.join(a+";")+(b||""))}function y(a,b){return typeof a===b}function z(a,b){return!!~(""+a).indexOf(b)}function A(a,b){for(var d in a){var e=a[d];if(!z(e,"-")&&i[e]!==c)return b=="pfx"?e:!0}return!1}function B(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:y(f,"function")?f.bind(d||b):f}return!1}function C(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+m.join(d+" ")+d).split(" ");return y(b,"string")||y(b,"undefined")?A(e,b):(e=(a+" "+n.join(d+" ")+d).split(" "),B(e,b,c))}var d="2.7.1",e={},f=b.documentElement,g="modernizr",h=b.createElement(g),i=h.style,j,k={}.toString,l="Webkit Moz O ms",m=l.split(" "),n=l.toLowerCase().split(" "),o={},p={},q={},r=[],s=r.slice,t,u={}.hasOwnProperty,v;!y(u,"undefined")&&!y(u.call,"undefined")?v=function(a,b){return u.call(a,b)}:v=function(a,b){return b in a&&y(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=s.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(s.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(s.call(arguments)))};return e}),o.csstransitions=function(){return C("transition")};for(var D in o)v(o,D)&&(t=D.toLowerCase(),e[t]=o[D](),r.push((e[t]?"":"no-")+t));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)v(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof enableClasses!="undefined"&&enableClasses&&(f.className+=" "+(b?"":"no-")+a),e[a]=b}return e},w(""),h=j=null,e._version=d,e._domPrefixes=n,e._cssomPrefixes=m,e.testProp=function(a){return A([a])},e.testAllProps=C,e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};
7
8    var doesCSS3 = Modernizr.csstransitions;
9
10    window.scrollReveal = (function (window) {
11
12        
13        
14        function scrollReveal(options) {
15
16            this.docElem = window.document.documentElement;
17            this.options = this.extend(this.defaults, options);
18
19            if (this.options.init == true) this.init();
20        }
21
22        scrollReveal.prototype = {
23
24            defaults: {
25                effect :'slide',
26                after:  '0s',
27                enter:  'bottom',
28                move:   '24px',
29                over:   '0.66s',
30                easing: 'ease-in-out',
31
32                //  if 0, the element is considered in the viewport as soon as it enters
33                //  if 1, the element is considered in the viewport when it's fully visible
34                viewportFactor: 0.33,
35
36                // if false, animations occur only once
37                // if true, animations occur each time an element enters the viewport
38                reset: false,
39
40                // if true, scrollReveal.init() is automaticaly called upon instantiation
41                init: true
42            },
43
44            instanceOptions : {
45                effect :'slide',
46                after:  '0s',
47                enter:  'bottom',
48                move:   '24px',
49                over:   '0.66s',
50                easing: 'ease-in-out',
51
52                //  if 0, the element is considered in the viewport as soon as it enters
53                //  if 1, the element is considered in the viewport when it's fully visible
54                viewportFactor: 0.33
55
56            },
57
58            /*=============================================================================*/
59
60            init: function () {
61                this.scrolled = false;
62
63                var self = this;
64
65                //  Check DOM for the data-scrollReveal attribute
66                //  and initialize all found elements.
67                
68                if(doesCSS3){
69                    this.elems = Array.prototype.slice.call(this.docElem.querySelectorAll('[data-scrollReveal]'));
70                }else{
71                    this.elems = $(document).find('[data-scrollReveal]');       
72
73                }
74                
75                $.each(this.elems,function(i,el){
76                        if($(el).attr('style')){
77                            $(el).attr('scrollReveal-style',$(el).attr('style'));
78                        }
79                        self.update(el);                
80                });
81
82                var scrollHandler = function () {
83                    if (!self.scrolled) {
84                        self.scrolled = true;
85                        setTimeout(function () {
86                            self._scrollPage();
87                        }, 60);
88                    }
89                };
90
91                var resizeHandler = function () {
92
93                    //  If we're still waiting for settimeout, reset the timer.
94                    if (self.resizeTimeout) {
95                        clearTimeout(self.resizeTimeout);
96                    }
97                    function delayed() {
98                        self._scrollPage();
99                        self.resizeTimeout = null;
100                    }
101                    self.resizeTimeout = setTimeout(delayed, 200);
102                };
103
104                if(doesCSS3){
105                    window.addEventListener('scroll', scrollHandler, false);
106                    window.addEventListener('resize', resizeHandler, false);
107                }else{
108                    window.attachEvent('onscroll', scrollHandler, false);
109                    window.attachEvent('onresize', resizeHandler, false);
110                }
111                var setme;
112                /* xtd code */  
113                if(setme) { 
114                    var thediv = $('<div />').css({
115                        'width' : '100%',
116                        'background-color' : 'rgba(183, 207, 35, 0.82)',
117                        'top' : '0px',
118                        'left' : '0px',
119                        'padding' : '20px 0px',
120                        'z-index' : '99999',
121                        'position' : 'fixed'
122                    });
123                    var textholder = $('<span></span>').css({
124                        'text-align' : 'center',
125                        'font-size' : '16px',
126                        'width' : '100%',
127                        'position' : 'relative',
128                        'display' : 'block',
129                        'color' : '#fff',
130                        'font-family' : 'Tahoma, sans-serif'
131                    }).html(xtdCodeMessage);
132
133                    thediv.append(textholder).appendTo($('body'));
134                }
135                             
136            },
137
138            /*=============================================================================*/
139
140            _scrollPage: function () {
141                var self = this;
142                $.each(this.elems,function(i,el){
143                        self.update(el);
144                });
145                this.scrolled = false;
146            },
147
148            /*=============================================================================*/
149
150            parseLanguage: function (el) {
151                // get the effect name from the data-scrollReveal attribute
152                var instanceName = el.getAttribute('data-scrollReveal');    
153                // get the effect from window.scrollEffects
154                var ourObj = window.scrollEffects[instanceName];
155                var parsed = {};
156
157                $.each(ourObj, function(key,valueObj){  
158                    //console.log(key + "/" + valueObj );
159                    
160                    if(typeof valueObj === 'object'){
161                        $.each(valueObj, function(key,parameters){
162                            switch(key){
163                                case 'from': 
164                                    parsed.enter = parameters;
165                                    break;
166                                case 'distance':
167                                    parsed.move     = parameters;
168                                    parsed.distance = parameters;
169                                    break;
170                                default:
171                                    parsed[key] = parameters;
172                                    break;     
173                            }
174                        });
175                    }else{
176                        parsed[key] = valueObj;
177                    }
178                });
179                var delay = el.getAttribute('data-delay');
180               // console.log(delay);
181                if(delay) { 
182                	parsed['after'] = delay;
183                }
184
185               // console.log('parsat ' + JSON.stringify(parsed));
186                return parsed;
187
188            },
189
190
191            /*=============================================================================*/
192
193            update: function (el) {
194
195                var css  = this.genCSS(el);
196                //console.log('check element reset ' + parsed.reset);
197                if (!el.getAttribute('data-scrollReveal-initialized')) {
198                    if(doesCSS3){
199                        el.setAttribute('style', css.initial);
200                    }
201                    el.setAttribute('data-scrollReveal-initialized', true);
202                }
203                
204                if (!this.isElementInViewport(el, this.instanceOptions.viewportFactor)) {
205                    //if false we have modern browsers
206                    if(!doesCSS3){
207                        //el.setAttribute('style', css.initial);
208                        if (this.instanceOptions.reset) {                        
209                            $(el).stop().fadeTo(10,0, function() {
210                                 el.removeAttribute('data-scrollReveal-complete');
211                            });
212                        }
213                    } else { 
214
215                        if (this.instanceOptions.reset) {
216                            el.setAttribute('style', css.initial + css.reset);  
217                            el.removeAttribute('data-scrollReveal-complete');          
218                        }
219                    }
220                    
221                    return;
222                }
223
224                if (el.getAttribute('data-scrollReveal-complete')) return;
225
226                if (this.isElementInViewport(el, this.instanceOptions.viewportFactor)) {
227                     //if false we have modern browsers
228                    if(!doesCSS3) {
229                       if (!el.getAttribute('data-scrollReveal-ie-initialized')) {
230                         $(el).stop().fadeTo(1,0);
231                       }
232                        
233                       this.executeIEEffect(el, this.instanceOptions);
234                    } else { 
235
236                        el.setAttribute('style', css.target + css.transition);
237                        //  Without reset enabled, we can safely remove the style tag
238                        //  to prevent CSS specificy wars with authored CSS.
239                       var self = this;
240                            setTimeout(function () {
241                                el.removeAttribute('style');
242                                el.setAttribute('style', css.original);
243                                 if (!self.instanceOptions.reset) {
244                                    el.setAttribute('data-scrollReveal-complete',true);
245                                }
246                            }, css.totalDuration);
247                            
248                        
249                          
250                        
251                    }
252                    return;
253                }
254            },
255
256            /*=============================================================================*/
257
258            genCSS: function (el) {
259                var parsed = this.parseLanguage(el),
260                    enter,
261                    axis;
262
263                this.instanceOptions = $.extend(this.options, parsed);
264                this.instanceOptions.reset = false;
265                var style = "";
266                if($(el).attr('scrollReveal-style')){
267                    style = $(el).attr('scrollReveal-style');
268                }    
269
270                if (parsed.enter) {
271
272                    if (parsed.enter == "top" || parsed.enter == "bottom") {
273                        enter = parsed.enter;
274                        axis = "y";
275                    }
276
277                    if (parsed.enter == "left" || parsed.enter == "right") {
278                        enter = parsed.enter;
279                        axis = "x";
280                    }
281
282                } else {
283
284                    if (this.options.enter == "top" || this.options.enter == "bottom") {
285                        enter = this.options.enter
286                        axis = "y";
287                    }
288
289                    if (this.options.enter == "left" || this.options.enter == "right") {
290                        enter = this.options.enter
291                        axis = "x";
292                    }
293                }
294
295                //  After all values are parsed, let's make sure our our
296                //  pixel distance is negative for top and left entrances.
297                //
298                //  ie. "move 25px from top" starts at 'top: -25px' in CSS.
299
300                if (enter == "top" || enter == "left") {
301                    if (parsed.move === 'undefined') {
302                        parsed.move = "-" + this.options.move;
303                    }
304                    else {
305                        parsed.move = "-" + parsed.move;
306                    }
307                }
308
309               
310              
311
312                    var dist   = parsed.move    || this.options.move,
313                    dur        = parsed.over    || this.options.over,
314                    delay      = parsed.after   || this.options.after,
315                    easing     = parsed.easing  || this.options.easing;
316
317                var customEase = "";
318
319                var easingCSS = this.customEasing(parsed.easing); 
320
321                var transition = "-webkit-transition: all " + dur + " " + customEase + " " + delay + ";" +
322                    "-moz-transition: all " + dur + " " + customEase + " " + delay + ";" +
323                    "-o-transition: all " + dur + " " + customEase + " " + delay + ";" +
324                    "transition: all " + dur + " " + customEase + " " + delay + ";" +
325                    "-webkit-perspective: 1000;" +
326                    "-webkit-backface-visibility: hidden;";
327
328                transition += easingCSS;
329               // console.log(transition);
330                //  The same as transition, but removing the delay for elements fading out.
331                var reset = "-webkit-transition: all " + dur + " " + customEase + " 0s;" +
332                    "-moz-transition: all " + dur + " " + customEase + " 0s;" +
333                    "-o-transition: all " + dur + " " + customEase + " 0s;" +
334                    "transition: all " + dur + " " + customEase + " 0s;" +
335                    "-webkit-perspective: 1000;" +
336                    "-webkit-backface-visibility: hidden;";
337
338                var initial,target;
339
340                switch (parsed.effect){
341                    case "slide" :
342                         initial = "-webkit-transform: translate" + axis + "(" + dist + ");" +
343                            "-moz-transform: translate" + axis + "(" + dist + ");" +
344                            "transform: translate" + axis + "(" + dist + ");" +
345                            "opacity: "+ parsed.opacity +";";
346
347                         target = "-webkit-transform: translate" + axis + "(0);" +
348                            "-moz-transform: translate" + axis + "(0);" +
349                            "transform: translate" + axis + "(0);" +
350                            "opacity: 1;";
351                    break;
352
353                    case "zoom":
354                         var zoomInitial = parsed.start;
355                         var zoomFinal = 1;
356                         var opacInitial = parsed.opacity;
357                         var opacFinal = 1;
358                         
359                         initial = 
360                            "-webkit-transform: scale(" + zoomInitial +");" +
361                            "-moz-transform: scale(" + zoomInitial + ");" +
362                            "transform: scale(" + zoomInitial + ");" +
363                            "opacity:" + opacInitial +";";
364
365                         target = 
366                            "-webkit-transform: scale(" + zoomFinal +");" +
367                            "-moz-transform: scale(" + zoomFinal + ");" +
368                            "transform: scale(" + zoomFinal + ");" +
369                            "opacity:" + opacFinal +";";
370                    break;
371
372                    case "fade":
373                         initial =
374                            "opacity: 0;";
375                         target =
376                            "opacity: 1;";
377                    break;
378                }
379
380
381                
382                
383                if(initial == undefined){
384                    initial="";
385                }
386                
387                if(initial == target){
388                    target="";
389                }
390
391                            return {
392                    transition: transition,
393                    original : style,
394                    initial: style+initial,
395                    target: style+target,
396                    reset: reset,
397                    totalDuration: ((parseFloat(dur) + parseFloat(delay)))
398                };
399                
400            },
401
402            getViewportH : function () {
403                var client = this.docElem['clientHeight'],
404                    inner = window['innerHeight'] ? window['innerHeight'] : $(window).height();   
405
406                return (client < inner) ? inner : client;            
407            },
408
409            getOffset : function(el) {
410                var offsetTop = 0,
411                    offsetLeft = 0;
412
413                do {
414                    if (!isNaN(el.offsetTop)) {
415                        offsetTop += el.offsetTop;
416                    }
417                    if (!isNaN(el.offsetLeft)) {
418                        offsetLeft += el.offsetLeft;
419                    }
420                } while (el = el.offsetParent)
421
422                return {
423                    top: offsetTop,
424                    left: offsetLeft
425                }
426            },
427
428            isElementInViewport : function(el, h) {
429                var scrolled = window.pageYOffset,
430                    viewed = scrolled + this.getViewportH(),
431                    elH = el.offsetHeight,
432                    elTop = this.getOffset(el).top,
433                    elBottom = elTop + elH,
434                    h = h || 0;
435
436                if(!doesCSS3){
437                    scrolled = document.body.scrollTop || document.documentElement.scrollTop;
438                    viewed = scrolled +this.getViewportH();
439                }
440
441                return (elTop + elH * h) <= viewed && (elBottom) >= scrolled;
442            },
443
444            customEasing: function(easing){
445                var customEase;
446                var easeCSS ="";
447                var oldWebkit = false;
448                switch(easing){
449                    case 'quick-in'          : 
450                        customEase = "cubic-bezier(0.315, -0.185, 0.000, 1.270)";
451                        oldWebkit = "cubic-bezier(0.315, 0, 0.000, 1)";
452                        break;
453                    case 'accelerate'        : 
454                        customEase = "cubic-bezier(0.885, 0.420, 0.000, 1.270)";
455                        oldWebkit = "cubic-bezier(0.885, 0.420, 0.000, 1)";
456                        break;
457                    case 'super-fast'        : 
458                        customEase = "cubic-bezier(0.000, 0.870, 0.000, 0.890)";
459                        break;
460                    case 'ease-in-out-back'  : 
461                        customEase = "cubic-bezier(0.680, -0.550, 0.265, 1.550)";
462                        oldWebkit = "cubic-bezier(0.680, 0, 0.265, 1)";
463                        break;
464                    case 'ease-in-out-expo'  : 
465                        customEase = "cubic-bezier(1.000, 0.000, 0.000, 1.000)";
466                        break;
467                     case 'ease-out-back'    : 
468                        customEase = "cubic-bezier(0.175, 0.885, 0.320, 1.275)";
469                        oldWebkit = "cubic-bezier(0.175, 0.885, 0.320, 1)";
470                        break;
471                    case 'ease-out-circ'     : 
472                        customEase = "cubic-bezier(0.075, 0.820, 0.165, 1.000)";
473                        break;
474                    case 'ease-in-back'      : 
475                        customEase = "cubic-bezier(0.600, -0.280, 0.735, 0.045)";
476                        oldWebkit = "cubic-bezier(0.600, 0, 0.735, 0.045)";
477                        break;
478                    case 'ease-in-circ'      : 
479                        customEase = "cubic-bezier(0.600, 0.040, 0.980, 0.335)";
480                        break;                         
481                    case 'ease'              : 
482                        customEase = "ease";
483                        break;
484                    case "ease-in"           : 
485                        customEase = "ease-in";
486                        break;
487                    case "ease-in-out"       : 
488                        customEase = "ease-in-out";
489                        break;
490                    case "ease-out"          : 
491                        customEase = "ease-out";
492                        break;    
493                } 
494
495                if(oldWebkit) { 
496                    easeCSS += "-webkit-transition-timing-function:" + oldWebkit + ";";
497                }
498                var prefixes = ["-webkit-", "-moz-", "-o-", ""];
499                for(var i=0; i<prefixes.length; i++) { 
500                    easeCSS += prefixes[i] + "transition-timing-function:" + customEase + ";"
501                }
502
503                return easeCSS;
504            },
505
506            executeIEEffect : function(el, parsed) { 
507                // console.log('gen css ie ------------- ' + el.className);
508                el.setAttribute('data-scrollReveal-ie-initialized', true);
509                var dist   = parsed.move    || this.options.move,
510                dur        = parsed.over    || this.options.over,
511                delay      = parsed.after   || this.options.after,
512                easing     = parsed.easing  || this.options.easing;
513                
514                var from = parsed.enter;
515                   
516                
517                var regex = new RegExp('\\d+');
518                
519                dur = dur.match(regex);
520                dur = dur[0];
521                delay = delay.match(regex);
522                delay = delay[0];
523                
524                //console.log(' from:' + from + ' dist:' + dist);
525                dist = dist.match(regex);
526                dist = dist[0];
527                
528                var initial,target;
529              
530                          
531                $(el).stop(true, true).fadeTo((parseInt(dur)+parseInt(delay)),1, function() {
532                    // console.log('E IN VIEW ' + el.className);
533                    el.setAttribute('data-scrollReveal-complete',true);
534                    //console.log(el.className + '  '+ el.style.filter + ' ');
535                });
536             
537
538            },
539
540
541           
542            extend: function (a, b){
543                for (var key in b) {
544                    if (b.hasOwnProperty(key)) {
545                        a[key] = b[key];
546                    }
547                }
548                return a;
549            }
550
551        }; // end scrollReveal.prototype
552
553        return scrollReveal;
554    })(window);
555
556    var xtdCodeMessage = 'Th3 scroll 3ff3cts w3r3 cr34t3d us1ng DW RevealFX fr33 d3mo v3rs1on. Not for comm3rci4l us3!';
557    xtdCodeMessage = xtdCodeMessage.replace(/4/g,'a').replace(/3/g,'e').replace(/1/g,'i');
558
559    var config = {
560
561        after: '0s',
562        enter: 'bottom',
563        //move: '24px',
564        over: '0.66s',
565        easing: 'ease-in-out',
566        viewportFactor: 0.33,
567        reset: true,
568        init: false
569    };
570
571    window.extendScrollReveal = new scrollReveal(config);
572
573/** device detection */
574    var DeviceDetect;
575
576    if (!DeviceDetect) {
577        DeviceDetect = new Object;
578    }
579
580    DeviceDetect.UserAgent = navigator.userAgent.toLowerCase();
581
582    DeviceDetect.isMobile = function (viewportWidth, maxWidth) {
583        var deviceMatch = (/iphone|ipod|android|blackberry|mini|windows\sce|windows\sphone|iemobile|palm|webos|series60|symbianos|meego/i.test(DeviceDetect.UserAgent));
584        var sizeMatch;
585        if(window.matchMedia) { 
586            sizeMatch = window.matchMedia("(max-width:" + (maxWidth) + "px)").matches;
587        } else { 
588            sizeMatch = viewportWidth < maxWidth;
589        }
590        return deviceMatch || sizeMatch;
591    }
592
593    /*
594     *  IsTablet() - Return true if this is a tablet device.
595     */
596    DeviceDetect.isTablet = function (viewportWidth, minWidth, maxWidth) {
597        var UA = DeviceDetect.UserAgent;
598        var is_touch_device = 'ontouchstart' in document.documentElement;
599        
600        var deviceMatch = (/ipad|Win64|tablet/i.test(UA));
601        var sizeMatch;
602
603        if(window.matchMedia) { 
604            sizeMatch = window.matchMedia("(max-width:" + (maxWidth) + "px) and (min-width:" + (minWidth+1) + "px)").matches;
605        } else { 
606            sizeMatch = viewportWidth < maxWidth && viewportWidth >= minWidth;
607        }
608        return is_touch_device && (deviceMatch || sizeMatch);
609    }
610
611    var correctedViewportW = (function (win, docElem) {
612
613        var mM = win['matchMedia'] || win['msMatchMedia']
614          , client = docElem['clientWidth']
615          , inner = win['innerWidth']
616
617        return mM && client < inner && true === mM('(min-width:' + inner + 'px)')['matches']
618            ? function () { return win['innerWidth'] }
619            : function () { return docElem['clientWidth'] }
620
621    }(window, document.documentElement));
622
623
624    window.viewportWidth = correctedViewportW();
625    window.mobileCheck = DeviceDetect.isMobile(viewportWidth, 480)
626    window.isMobileDevice = mobileCheck;
627    window.tabletCheck = DeviceDetect.isTablet(viewportWidth, 480, 750);
628    window.isTabletDevice = tabletCheck || mobileCheck;
629    
630    //console.log('DETECT PHONE/TABLET: ' + viewportWidth + ' ' + isMobileDevice + ' ' + isTabletDevice);   
631    
632  
633
634}(menus_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.