PageSourceSearch

https://www.takwene.com/Assets/vendor/common/common.js

js takwene.com collected 2026-09-24 19:20:26 UTC 37,494 bytes, 1,058 lines download raw bytes

1/*
2Plugin Name: 	BrowserSelector
3Written by: 	Okler Themes - (http://www.okler.net)
4Theme Version:	5.7.2
5*/
6
7(function ($) {
8    $.extend({
9
10        browserSelector: function () {
11
12            // jQuery.browser.mobile (http://detectmobilebrowser.com/)
13            (function (a) { (jQuery.browser = jQuery.browser || {}).mobile = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|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 )|sy(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)) })(navigator.userAgent || navigator.vendor || window.opera);
14
15            // Touch
16            var hasTouch = 'ontouchstart' in window || navigator.msMaxTouchPoints;
17
18            var u = navigator.userAgent,
19				ua = u.toLowerCase(),
20				is = function (t) {
21				    return ua.indexOf(t) > -1;
22				},
23				g = 'gecko',
24				w = 'webkit',
25				s = 'safari',
26				o = 'opera',
27				h = document.documentElement,
28				b = [(!(/opera|webtv/i.test(ua)) && /msie\s(\d)/.test(ua)) ? ('ie ie' + parseFloat(navigator.appVersion.split("MSIE")[1])) : is('firefox/2') ? g + ' ff2' : is('firefox/3.5') ? g + ' ff3 ff3_5' : is('firefox/3') ? g + ' ff3' : is('gecko/') ? g : is('opera') ? o + (/version\/(\d+)/.test(ua) ? ' ' + o + RegExp.jQuery1 : (/opera(\s|\/)(\d+)/.test(ua) ? ' ' + o + RegExp.jQuery2 : '')) : is('konqueror') ? 'konqueror' : is('chrome') ? w + ' chrome' : is('iron') ? w + ' iron' : is('applewebkit/') ? w + ' ' + s + (/version\/(\d+)/.test(ua) ? ' ' + s + RegExp.jQuery1 : '') : is('mozilla/') ? g : '', is('j2me') ? 'mobile' : is('iphone') ? 'iphone' : is('ipod') ? 'ipod' : is('mac') ? 'mac' : is('darwin') ? 'mac' : is('webtv') ? 'webtv' : is('win') ? 'win' : is('freebsd') ? 'freebsd' : (is('x11') || is('linux')) ? 'linux' : '', 'js'];
29
30            c = b.join(' ');
31
32            if ($.browser.mobile) {
33                c += ' mobile';
34            }
35
36            if (hasTouch) {
37                c += ' touch';
38            }
39
40            h.className += ' ' + c;
41
42            // IE11 Detect
43            var isIE11 = !(window.ActiveXObject) && "ActiveXObject" in window;
44
45            if (isIE11) {
46                $('html').removeClass('gecko').addClass('ie ie11');
47                return;
48            }
49
50            // Dark and Boxed Compatibility
51            if ($('body').hasClass('dark')) {
52                $('html').addClass('dark');
53            }
54
55            if ($('body').hasClass('boxed')) {
56                $('html').addClass('boxed');
57            }
58
59        }
60
61    });
62
63    $.browserSelector();
64
65})(jQuery);
66
67/*
68Plugin Name: 	Count To
69Written by: 	Matt Huggins - https://github.com/mhuggins/jquery-countTo
70*/
71
72(function ($) {
73    $.fn.countTo = function (options) {
74        options = options || {};
75
76        return $(this).each(function () {
77            // set options for current element
78            var settings = $.extend({}, $.fn.countTo.defaults, {
79                from: $(this).data('from'),
80                to: $(this).data('to'),
81                speed: $(this).data('speed'),
82                refreshInterval: $(this).data('refresh-interval'),
83                decimals: $(this).data('decimals')
84            }, options);
85
86            // how many times to update the value, and how much to increment the value on each update
87            var loops = Math.ceil(settings.speed / settings.refreshInterval),
88				increment = (settings.to - settings.from) / loops;
89
90            // references & variables that will change with each update
91            var self = this,
92				$self = $(this),
93				loopCount = 0,
94				value = settings.from,
95				data = $self.data('countTo') || {};
96
97            $self.data('countTo', data);
98
99            // if an existing interval can be found, clear it first
100            if (data.interval) {
101                clearInterval(data.interval);
102            }
103            data.interval = setInterval(updateTimer, settings.refreshInterval);
104
105            // initialize the element with the starting value
106            render(value);
107
108            function updateTimer() {
109                value += increment;
110                loopCount++;
111
112                render(value);
113
114                if (typeof (settings.onUpdate) == 'function') {
115                    settings.onUpdate.call(self, value);
116                }
117
118                if (loopCount >= loops) {
119                    // remove the interval
120                    $self.removeData('countTo');
121                    clearInterval(data.interval);
122                    value = settings.to;
123
124                    if (typeof (settings.onComplete) == 'function') {
125                        settings.onComplete.call(self, value);
126                    }
127                }
128            }
129
130            function render(value) {
131                var formattedValue = settings.formatter.call(self, value, settings);
132                $self.html(formattedValue);
133            }
134        });
135    };
136
137    $.fn.countTo.defaults = {
138        from: 0,               // the number the element should start at
139        to: 0,                 // the number the element should end at
140        speed: 1000,           // how long it should take to count between the target numbers
141        refreshInterval: 100,  // how often the element should be updated
142        decimals: 0,           // the number of decimal places to show
143        formatter: formatter,  // handler for formatting the value before rendering
144        onUpdate: null,        // callback method for every time the element is updated
145        onComplete: null       // callback method for when the element finishes updating
146    };
147
148    function formatter(value, settings) {
149        value = value.toFixed(settings.decimals);
150        value = value.replace(/\B(?=(?:\d{3})+(?!\d))/g, ',');
151        return value;
152        //return value.toFixed(settings.decimals);
153    }
154}(jQuery));
155
156/*
157Plugin Name: 	Visible
158Written by: 	https://github.com/customd/jquery-visible/blob/master/jquery.visible.js
159Description: 	This is a jQuery plugin which allows us to quickly check if an element is within the browsers visual viewport.
160*/
161!function (t) { var i = t(window); t.fn.visible = function (t, e, o) { if (!(this.length < 1)) { var r = this.length > 1 ? this.eq(0) : this, n = r.get(0), f = i.width(), h = i.height(), o = o ? o : "both", l = e === !0 ? n.offsetWidth * n.offsetHeight : !0; if ("function" == typeof n.getBoundingClientRect) { var g = n.getBoundingClientRect(), u = g.top >= 0 && g.top < h, s = g.bottom > 0 && g.bottom <= h, c = g.left >= 0 && g.left < f, a = g.right > 0 && g.right <= f, v = t ? u || s : u && s, b = t ? c || a : c && a; if ("both" === o) return l && v && b; if ("vertical" === o) return l && v; if ("horizontal" === o) return l && b } else { var d = i.scrollTop(), p = d + h, w = i.scrollLeft(), m = w + f, y = r.offset(), z = y.top, B = z + r.height(), C = y.left, R = C + r.width(), j = t === !0 ? B : z, q = t === !0 ? z : B, H = t === !0 ? R : C, L = t === !0 ? C : R; if ("both" === o) return !!l && p >= q && j >= d && m >= L && H >= w; if ("vertical" === o) return !!l && p >= q && j >= d; if ("horizontal" === o) return !!l && m >= L && H >= w } } } }(jQuery);
162
163/*
164Plugin Name: 	afterResize.js
165Written by: 	https://github.com/mcshaman/afterResize.js
166Description: 	Simple jQuery plugin designed to emulate an 'after resize' event.
167*/
168(function ($) {
169    "use strict";
170
171    // Define default settings
172    var defaults = {
173        action: function () { },
174        runOnLoad: false,
175        duration: 500
176    };
177
178    // Define global variables
179    var settings = defaults,
180		running = false,
181		start;
182
183    var methods = {};
184
185    // Initial plugin configuration
186    methods.init = function () {
187
188        // Allocate passed arguments to settings based on type
189        for (var i = 0; i <= arguments.length; i++) {
190            var arg = arguments[i];
191            switch (typeof arg) {
192                case "function":
193                    settings.action = arg;
194                    break;
195                case "boolean":
196                    settings.runOnLoad = arg;
197                    break;
198                case "number":
199                    settings.duration = arg;
200                    break;
201            }
202        }
203
204        // Process each matching jQuery object
205        return this.each(function () {
206
207            if (settings.runOnLoad) { settings.action(); }
208
209            $(this).resize(function () {
210
211                methods.timedAction.call(this);
212
213            });
214
215        });
216    };
217
218    methods.timedAction = function (code, millisec) {
219
220        var doAction = function () {
221            var remaining = settings.duration;
222
223            if (running) {
224                var elapse = new Date() - start;
225                remaining = settings.duration - elapse;
226                if (remaining <= 0) {
227                    // Clear timeout and reset running variable
228                    clearTimeout(running);
229                    running = false;
230                    // Perform user defined function
231                    settings.action();
232
233                    return;
234                }
235            }
236            wait(remaining);
237        };
238
239        var wait = function (time) {
240            running = setTimeout(doAction, time);
241        };
242
243        // Define new action starting time
244        start = new Date();
245
246        // Define runtime settings if function is run directly
247        if (typeof millisec === 'number') { settings.duration = millisec; }
248        if (typeof code === 'function') { settings.action = code; }
249
250        // Only run timed loop if not already running
251        if (!running) { doAction(); }
252
253    };
254
255
256    $.fn.afterResize = function (method) {
257
258        if (methods[method]) {
259            return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
260        } else {
261            return methods.init.apply(this, arguments);
262        }
263
264    };
265
266})(jQuery);
267
268/*
269Plugin Name: 	matchHeight
270Written by: 	Okler Themes - (http://www.okler.net)
271Theme Version:	5.7.2
272
273Based on:
274
275	jquery.matchHeight-min.js v0.5.2
276	Licensed under the terms of the MIT license.
277
278*/
279
280; (function ($) {
281    /*
282	*  internal
283	*/
284
285    var _previousResizeWidth = -1,
286		_updateTimeout = -1;
287
288    /*
289	*  _rows
290	*  utility function returns array of jQuery selections representing each row
291	*  (as displayed after float wrapping applied by browser)
292	*/
293
294    var _rows = function (elements) {
295        var tolerance = 1,
296			$elements = $(elements),
297			lastTop = null,
298			rows = [];
299
300        // group elements by their top position
301        $elements.each(function () {
302            var $that = $(this),
303				top = $that.offset().top - _parse($that.css('margin-top')),
304				lastRow = rows.length > 0 ? rows[rows.length - 1] : null;
305
306            if (lastRow === null) {
307                // first item on the row, so just push it
308                rows.push($that);
309            } else {
310                // if the row top is the same, add to the row group
311                if (Math.floor(Math.abs(lastTop - top)) <= tolerance) {
312                    rows[rows.length - 1] = lastRow.add($that);
313                } else {
314                    // otherwise start a new row group
315                    rows.push($that);
316                }
317            }
318
319            // keep track of the last row top
320            lastTop = top;
321        });
322
323        return rows;
324    };
325
326    /*
327	*  _parse
328	*  value parse utility function
329	*/
330
331    var _parse = function (value) {
332        // parse value and convert NaN to 0
333        return parseFloat(value) || 0;
334    };
335
336    /*
337	*  _parseOptions
338	*  handle plugin options
339	*/
340
341    var _parseOptions = function (options) {
342        var opts = {
343            byRow: true,
344            remove: false,
345            property: 'height'
346        };
347
348        if (typeof options === 'object') {
349            return $.extend(opts, options);
350        }
351
352        if (typeof options === 'boolean') {
353            opts.byRow = options;
354        } else if (options === 'remove') {
355            opts.remove = true;
356        }
357
358        return opts;
359    };
360
361    /*
362	*  matchHeight
363	*  plugin definition
364	*/
365
366    var matchHeight = $.fn.matchHeight = function (options) {
367        var opts = _parseOptions(options);
368
369        // handle remove
370        if (opts.remove) {
371            var that = this;
372
373            // remove fixed height from all selected elements
374            this.css(opts.property, '');
375
376            // remove selected elements from all groups
377            $.each(matchHeight._groups, function (key, group) {
378                group.elements = group.elements.not(that);
379            });
380
381            // TODO: cleanup empty groups
382
383            return this;
384        }
385
386        if (this.length <= 1)
387            return this;
388
389        // keep track of this group so we can re-apply later on load and resize events
390        matchHeight._groups.push({
391            elements: this,
392            options: opts
393        });
394
395        // match each element's height to the tallest element in the selection
396        matchHeight._apply(this, opts);
397
398        return this;
399    };
400
401    /*
402	*  plugin global options
403	*/
404
405    matchHeight._groups = [];
406    matchHeight._throttle = 80;
407    matchHeight._maintainScroll = false;
408    matchHeight._beforeUpdate = null;
409    matchHeight._afterUpdate = null;
410
411    /*
412	*  matchHeight._apply
413	*  apply matchHeight to given elements
414	*/
415
416    matchHeight._apply = function (elements, options) {
417        var opts = _parseOptions(options),
418			$elements = $(elements),
419			rows = [$elements];
420
421        // take note of scroll position
422        var scrollTop = $(window).scrollTop(),
423			htmlHeight = $('html').outerHeight(true);
424
425        // get hidden parents
426        var $hiddenParents = $elements.parents().filter(':hidden');
427
428        // cache the original inline style
429        $hiddenParents.each(function () {
430            var $that = $(this);
431            $that.data('style-cache', $that.attr('style'));
432        });
433
434        // temporarily must force hidden parents visible
435        $hiddenParents.css('display', 'block');
436
437        // get rows if using byRow, otherwise assume one row
438        if (opts.byRow) {
439
440            // must first force an arbitrary equal height so floating elements break evenly
441            $elements.each(function () {
442                var $that = $(this),
443					display = $that.css('display') === 'inline-block' ? 'inline-block' : 'block';
444
445                // cache the original inline style
446                $that.data('style-cache', $that.attr('style'));
447
448                $that.css({
449                    'display': display,
450                    'padding-top': '0',
451                    'padding-bottom': '0',
452                    'margin-top': '0',
453                    'margin-bottom': '0',
454                    'border-top-width': '0',
455                    'border-bottom-width': '0',
456                    'height': '100px'
457                });
458            });
459
460            // get the array of rows (based on element top position)
461            rows = _rows($elements);
462
463            // revert original inline styles
464            $elements.each(function () {
465                var $that = $(this);
466                $that.attr('style', $that.data('style-cache') || '');
467            });
468        }
469
470        $.each(rows, function (key, row) {
471            var $row = $(row),
472				maxHeight = 0;
473
474            // skip apply to rows with only one item
475            if (opts.byRow && $row.length <= 1) {
476                $row.css(opts.property, '');
477                return;
478            }
479
480            // iterate the row and find the max height
481            $row.each(function () {
482                var $that = $(this),
483					display = $that.css('display') === 'inline-block' ? 'inline-block' : 'block';
484
485                // ensure we get the correct actual height (and not a previously set height value)
486                var css = { 'display': display };
487                css[opts.property] = '';
488                $that.css(css);
489
490                // find the max height (including padding, but not margin)
491                if ($that.outerHeight(false) > maxHeight)
492                    maxHeight = $that.outerHeight(false);
493
494                // revert display block
495                $that.css('display', '');
496            });
497
498            // iterate the row and apply the height to all elements
499            $row.each(function () {
500                var $that = $(this),
501					verticalPadding = 0;
502
503                // handle padding and border correctly (required when not using border-box)
504                if ($that.css('box-sizing') !== 'border-box') {
505                    verticalPadding += _parse($that.css('border-top-width')) + _parse($that.css('border-bottom-width'));
506                    verticalPadding += _parse($that.css('padding-top')) + _parse($that.css('padding-bottom'));
507                }
508
509                // set the height (accounting for padding and border)
510                $that.css(opts.property, maxHeight - verticalPadding);
511            });
512        });
513
514        // revert hidden parents
515        $hiddenParents.each(function () {
516            var $that = $(this);
517            $that.attr('style', $that.data('style-cache') || null);
518        });
519
520        // restore scroll position if enabled
521        if (matchHeight._maintainScroll)
522            $(window).scrollTop((scrollTop / htmlHeight) * $('html').outerHeight(true));
523
524        return this;
525    };
526
527    /*
528	*  matchHeight._applyDataApi
529	*  applies matchHeight to all elements with a data-match-height attribute
530	*/
531
532    matchHeight._applyDataApi = function () {
533        var groups = {};
534
535        // generate groups by their groupId set by elements using data-match-height
536        $('[data-match-height], [data-mh]').each(function () {
537            var $this = $(this),
538				groupId = $this.attr('data-match-height') || $this.attr('data-mh');
539            if (groupId in groups) {
540                groups[groupId] = groups[groupId].add($this);
541            } else {
542                groups[groupId] = $this;
543            }
544        });
545
546        // apply matchHeight to each group
547        $.each(groups, function () {
548            this.matchHeight(true);
549        });
550    };
551
552    /*
553	*  matchHeight._update
554	*  updates matchHeight on all current groups with their correct options
555	*/
556
557    var _update = function (event) {
558        if (matchHeight._beforeUpdate)
559            matchHeight._beforeUpdate(event, matchHeight._groups);
560
561        $.each(matchHeight._groups, function () {
562            matchHeight._apply(this.elements, this.options);
563        });
564
565        if (matchHeight._afterUpdate)
566            matchHeight._afterUpdate(event, matchHeight._groups);
567    };
568
569    matchHeight._update = function (throttle, event) {
570        // prevent update if fired from a resize event
571        // where the viewport width hasn't actually changed
572        // fixes an event looping bug in IE8
573        if (event && event.type === 'resize') {
574            var windowWidth = $(window).width();
575            if (windowWidth === _previousResizeWidth)
576                return;
577            _previousResizeWidth = windowWidth;
578        }
579
580        // throttle updates
581        if (!throttle) {
582            _update(event);
583        } else if (_updateTimeout === -1) {
584            _updateTimeout = setTimeout(function () {
585                _update(event);
586                _updateTimeout = -1;
587            }, matchHeight._throttle);
588        }
589    };
590
591    /*
592	*  bind events
593	*/
594
595    // apply on DOM ready event
596    $(matchHeight._applyDataApi);
597
598    // update heights on load and resize events
599    $(window).bind('load', function (event) {
600        matchHeight._update(false, event);
601    });
602
603    // throttled update heights on resize events
604    $(window).bind('resize orientationchange', function (event) {
605        matchHeight._update(true, event);
606    });
607
608})(jQuery);
609
610/*
611Plugin Name: 	jQuery.pin
612Written by: 	Okler Themes - (http://www.okler.net)
613Theme Version:	5.7.2
614
615Based on:
616
617	https://github.com/webpop/jquery.pin
618	Licensed under the terms of the MIT license.
619
620*/
621(function ($) {
622    "use strict";
623    $.fn.pin = function (options) {
624        var scrollY = 0, elements = [], disabled = false, $window = $(window);
625
626        options = options || {};
627
628        var recalculateLimits = function () {
629            for (var i = 0, len = elements.length; i < len; i++) {
630                var $this = elements[i];
631
632                if (options.minWidth && $window.width() <= options.minWidth) {
633                    if ($this.parent().is(".pin-wrapper")) { $this.unwrap(); }
634                    $this.css({ width: "", left: "", top: "", position: "" });
635                    if (options.activeClass) { $this.removeClass(options.activeClass); }
636                    disabled = true;
637                    continue;
638                } else {
639                    disabled = false;
640                }
641
642                var $container = options.containerSelector ? $this.closest(options.containerSelector) : $(document.body);
643                var offset = $this.offset();
644                var containerOffset = $container.offset();
645                var parentOffset = $this.parent().offset();
646
647                if (!$this.parent().is(".pin-wrapper")) {
648                    $this.wrap("<div class='pin-wrapper'>");
649                }
650
651                var pad = $.extend({
652                    top: 0,
653                    bottom: 0
654                }, options.padding || {});
655
656                $this.data("pin", {
657                    pad: pad,
658                    from: (options.containerSelector ? containerOffset.top : offset.top) - pad.top,
659                    to: containerOffset.top + $container.height() - $this.outerHeight() - pad.bottom,
660                    end: containerOffset.top + $container.height(),
661                    parentTop: parentOffset.top
662                });
663
664                $this.css({ width: $this.outerWidth() });
665                $this.parent().css("height", $this.outerHeight());
666            }
667        };
668
669        var onScroll = function () {
670            if (disabled) { return; }
671
672            scrollY = $window.scrollTop();
673
674            var elmts = [];
675            for (var i = 0, len = elements.length; i < len; i++) {
676                var $this = $(elements[i]),
677					data = $this.data("pin");
678
679                if (!data) { // Removed element
680                    continue;
681                }
682
683                elmts.push($this);
684
685                var from = data.from - data.pad.bottom,
686					to = data.to - data.pad.top;
687
688                if (from + $this.outerHeight() > data.end) {
689                    $this.css('position', '');
690                    continue;
691                }
692
693                if (from < scrollY && to > scrollY) {
694                    !($this.css("position") == "fixed") && $this.css({
695                        left: $this.offset().left,
696                        top: data.pad.top
697                    }).css("position", "fixed");
698                    if (options.activeClass) { $this.addClass(options.activeClass); }
699                } else if (scrollY >= to) {
700                    $this.css({
701                        left: "",
702                        top: to - data.parentTop + data.pad.top
703                    }).css("position", "absolute");
704                    if (options.activeClass) { $this.addClass(options.activeClass); }
705                } else {
706                    $this.css({ position: "", top: "", left: "" });
707                    if (options.activeClass) { $this.removeClass(options.activeClass); }
708                }
709            }
710            elements = elmts;
711        };
712
713        var update = function () { recalculateLimits(); onScroll(); };
714
715        this.each(function () {
716            var $this = $(this),
717				data = $(this).data('pin') || {};
718
719            if (data && data.update) { return; }
720            elements.push($this);
721            $("img", this).one("load", recalculateLimits);
722            data.update = update;
723            $(this).data('pin', data);
724        });
725
726        $window.scroll(onScroll);
727        $window.resize(function () { recalculateLimits(); });
728        recalculateLimits();
729
730        $window.on('load', update);
731
732        return this;
733    };
734})(jQuery);
735
736/*
737Browser Workarounds
738*/
739if (/iPad|iPhone|iPod/.test(navigator.platform)) {
740
741    // iPad/Iphone/iPod Hover Workaround
742    $(document).ready(function ($) {
743        $('.thumb-info').attr('onclick', 'return true');
744    });
745}
746
747/* jQuery-FontSpy.js v3.0.0
748 * https://github.com/patrickmarabeas/jQuery-FontSpy.js
749 *
750 * Copyright 2013, Patrick Marabeas http://pulse-dev.com
751 * Released under the MIT license
752 * http://opensource.org/licenses/mit-license.php
753 *
754 * Date: 02/11/2015
755 */
756
757(function (w, $) {
758
759    fontSpy = function (fontName, conf) {
760        var $html = $('html'),
761            $body = $('body'),
762            fontFamilyName = fontName;
763
764        // Throw error if fontName is not a string or not is left as an empty string
765        if (typeof fontFamilyName !== 'string' || fontFamilyName === '') {
766            throw 'A valid fontName is required. fontName must be a string and must not be an empty string.';
767        }
768
769        var defaults = {
770            font: fontFamilyName,
771            fontClass: fontFamilyName.toLowerCase().replace(/\s/g, ''),
772            success: function () { },
773            failure: function () { },
774            testFont: 'Courier New',
775            testString: 'QW@HhsXJ',
776            glyphs: '',
777            delay: 50,
778            timeOut: 1000,
779            callback: $.noop
780        };
781
782        var config = $.extend(defaults, conf);
783
784        var $tester = $('<span>' + config.testString + config.glyphs + '</span>')
785            .css('position', 'absolute')
786            .css('top', '-9999px')
787            .css('left', '-9999px')
788            .css('visibility', 'hidden')
789            .css('fontFamily', config.testFont)
790            .css('fontSize', '250px');
791
792        $body.append($tester);
793
794        var fallbackFontWidth = $tester.outerWidth();
795
796        $tester.css('fontFamily', config.font + ',' + config.testFont);
797
798        var failure = function () {
799            $html.addClass("no-" + config.fontClass);
800            if (config && config.failure) {
801                config.failure();
802            }
803            config.callback(new Error('FontSpy timeout'));
804            $tester.remove();
805        };
806
807        var success = function () {
808            config.callback();
809            $html.addClass(config.fontClass);
810            if (config && config.success) {
811                config.success();
812            }
813            $tester.remove();
814        };
815
816        var retry = function () {
817            setTimeout(checkFont, config.delay);
818            config.timeOut = config.timeOut - config.delay;
819        };
820
821        var checkFont = function () {
822            var loadedFontWidth = $tester.outerWidth();
823
824            if (fallbackFontWidth !== loadedFontWidth) {
825                success();
826            } else if (config.timeOut < 0) {
827                failure();
828            } else {
829                retry();
830            }
831        }
832
833        checkFont();
834    }
835})(this, jQuery);
836
837/* waitForImages jQuery Plugin - v2.1.0 - 2016-01-04
838 * https://github.com/alexanderdickson/waitForImages
839 *
840 * Copyright (c) 2016 Alex Dickson; Licensed MIT
841 */
842
843; (function (factory) {
844    if (typeof define === 'function' && define.amd) {
845        // AMD. Register as an anonymous module.
846        define(['jquery'], factory);
847    } else if (typeof exports === 'object') {
848        // CommonJS / nodejs module
849        module.exports = factory(require('jquery'));
850    } else {
851        // Browser globals
852        factory(jQuery);
853    }
854}(function ($) {
855    // Namespace all events.
856    var eventNamespace = 'waitForImages';
857
858    // CSS properties which contain references to images.
859    $.waitForImages = {
860        hasImageProperties: [
861            'backgroundImage',
862            'listStyleImage',
863            'borderImage',
864            'borderCornerImage',
865            'cursor'
866        ],
867        hasImageAttributes: ['srcset']
868    };
869
870    // Custom selector to find all `img` elements with a valid `src` attribute.
871    $.expr[':']['has-src'] = function (obj) {
872        // Ensure we are dealing with an `img` element with a valid
873        // `src` attribute.
874        return $(obj).is('img[src][src!=""]');
875    };
876
877    // Custom selector to find images which are not already cached by the
878    // browser.
879    $.expr[':'].uncached = function (obj) {
880        // Ensure we are dealing with an `img` element with a valid
881        // `src` attribute.
882        if (!$(obj).is(':has-src')) {
883            return false;
884        }
885
886        return !obj.complete;
887    };
888
889    $.fn.waitForImages = function () {
890
891        var allImgsLength = 0;
892        var allImgsLoaded = 0;
893        var deferred = $.Deferred();
894
895        var finishedCallback;
896        var eachCallback;
897        var waitForAll;
898
899        // Handle options object (if passed).
900        if ($.isPlainObject(arguments[0])) {
901
902            waitForAll = arguments[0].waitForAll;
903            eachCallback = arguments[0].each;
904            finishedCallback = arguments[0].finished;
905
906        } else {
907
908            // Handle if using deferred object and only one param was passed in.
909            if (arguments.length === 1 && $.type(arguments[0]) === 'boolean') {
910                waitForAll = arguments[0];
911            } else {
912                finishedCallback = arguments[0];
913                eachCallback = arguments[1];
914                waitForAll = arguments[2];
915            }
916
917        }
918
919        // Handle missing callbacks.
920        finishedCallback = finishedCallback || $.noop;
921        eachCallback = eachCallback || $.noop;
922
923        // Convert waitForAll to Boolean
924        waitForAll = !!waitForAll;
925
926        // Ensure callbacks are functions.
927        if (!$.isFunction(finishedCallback) || !$.isFunction(eachCallback)) {
928            throw new TypeError('An invalid callback was supplied.');
929        }
930
931        this.each(function () {
932            // Build a list of all imgs, dependent on what images will
933            // be considered.
934            var obj = $(this);
935            var allImgs = [];
936            // CSS properties which may contain an image.
937            var hasImgProperties = $.waitForImages.hasImageProperties || [];
938            // Element attributes which may contain an image.
939            var hasImageAttributes = $.waitForImages.hasImageAttributes || [];
940            // To match `url()` references.
941            // Spec: http://www.w3.org/TR/CSS2/syndata.html#value-def-uri
942            var matchUrl = /url\(\s*(['"]?)(.*?)\1\s*\)/g;
943
944            if (waitForAll) {
945
946                // Get all elements (including the original), as any one of
947                // them could have a background image.
948                obj.find('*').addBack().each(function () {
949                    var element = $(this);
950
951                    // If an `img` element, add it. But keep iterating in
952                    // case it has a background image too.
953                    if (element.is('img:has-src') &&
954                        !element.is('[srcset]')) {
955                        allImgs.push({
956                            src: element.attr('src'),
957                            element: element[0]
958                        });
959                    }
960
961                    $.each(hasImgProperties, function (i, property) {
962                        var propertyValue = element.css(property);
963                        var match;
964
965                        // If it doesn't contain this property, skip.
966                        if (!propertyValue) {
967                            return true;
968                        }
969
970                        // Get all url() of this element.
971                        while (match = matchUrl.exec(propertyValue)) {
972                            allImgs.push({
973                                src: match[2],
974                                element: element[0]
975                            });
976                        }
977                    });
978
979                    $.each(hasImageAttributes, function (i, attribute) {
980                        var attributeValue = element.attr(attribute);
981                        var attributeValues;
982
983                        // If it doesn't contain this property, skip.
984                        if (!attributeValue) {
985                            return true;
986                        }
987
988                        allImgs.push({
989                            src: element.attr('src'),
990                            srcset: element.attr('srcset'),
991                            element: element[0]
992                        });
993                    });
994                });
995            } else {
996                // For images only, the task is simpler.
997                obj.find('img:has-src')
998                    .each(function () {
999                        allImgs.push({
1000                            src: this.src,
1001                            element: this
1002                        });
1003                    });
1004            }
1005
1006            allImgsLength = allImgs.length;
1007            allImgsLoaded = 0;
1008
1009            // If no images found, don't bother.
1010            if (allImgsLength === 0) {
1011                finishedCallback.call(obj[0]);
1012                deferred.resolveWith(obj[0]);
1013            }
1014
1015            $.each(allImgs, function (i, img) {
1016
1017                var image = new Image();
1018                var events =
1019                  'load.' + eventNamespace + ' error.' + eventNamespace;
1020
1021                // Handle the image loading and error with the same callback.
1022                $(image).one(events, function me(event) {
1023                    // If an error occurred with loading the image, set the
1024                    // third argument accordingly.
1025                    var eachArguments = [
1026                        allImgsLoaded,
1027                        allImgsLength,
1028                        event.type == 'load'
1029                    ];
1030                    allImgsLoaded++;
1031
1032                    eachCallback.apply(img.element, eachArguments);
1033                    deferred.notifyWith(img.element, eachArguments);
1034
1035                    // Unbind the event listeners. I use this in addition to
1036                    // `one` as one of those events won't be called (either
1037                    // 'load' or 'error' will be called).
1038                    $(this).off(events, me);
1039
1040                    if (allImgsLoaded == allImgsLength) {
1041                        finishedCallback.call(obj[0]);
1042                        deferred.resolveWith(obj[0]);
1043                        return false;
1044                    }
1045
1046                });
1047
1048                if (img.srcset) {
1049                    image.srcset = img.srcset;
1050                }
1051                image.src = img.src;
1052            });
1053        });
1054
1055        return deferred.promise();
1056
1057    };
1058}));

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.