PageSourceSearch

http://www.nord-nature.org/maquette-wordpress/wp-content/themes/ev…/library/media/js/main_backend.js?ver=7.1.2

js nord-nature.org collected 2026-09-24 23:03:35 UTC 75,426 bytes, 1,950 lines download raw bytes

vendor: 21,139 bytes, lines 1-509
1// Generated by CoffeeScript 1.6.2
2/*
3 jQuery Waypoints - v2.0.3
4 Copyright (c) 2011-2013 Caleb Troughton
5 Dual licensed under the MIT license and GPL license.
6 https://github.com/imakewebthings/jquery-waypoints/blob/master/licenses.txt
7 */
8(function () {
9    var __indexOf = [].indexOf || function (item) {
10        for (var i = 0, l = this.length; i < l; i++) {
11            if (i in this && this[i] === item)
12                return i;
13        }
14        return -1;
15    },
16            __slice = [].slice;
17
18    (function (root, factory) {
19        if (typeof define === 'function' && define.amd) {
20            return define('waypoints', ['jquery'], function ($) {
21                return factory($, root);
22            });
23        } else {
24            return factory(root.jQuery, root);
25        }
26    })(this, function ($, window) {
27        var $w, Context, Waypoint, allWaypoints, contextCounter, contextKey, contexts, isTouch, jQMethods, methods, resizeEvent, scrollEvent, waypointCounter, waypointKey, wp, wps;
28
29        $w = $(window);
30        isTouch = __indexOf.call(window, 'ontouchstart') >= 0;
31        allWaypoints = {
32            horizontal: {},
33            vertical: {}
34        };
35        contextCounter = 1;
36        contexts = {};
37        contextKey = 'waypoints-context-id';
38        resizeEvent = 'resize.waypoints';
39        scrollEvent = 'scroll.waypoints';
40        waypointCounter = 1;
41        waypointKey = 'waypoints-waypoint-ids';
42        wp = 'waypoint';
43        wps = 'waypoints';
44        Context = (function () {
45            function Context($element) {
46                var _this = this;
47
48                this.$element = $element;
49                this.element = $element[0];
50                this.didResize = false;
51                this.didScroll = false;
52                this.id = 'context' + contextCounter++;
53                this.oldScroll = {
54                    x: $element.scrollLeft(),
55                    y: $element.scrollTop()
56                };
57                this.waypoints = {
58                    horizontal: {},
59                    vertical: {}
60                };
61                $element.data(contextKey, this.id);
62                contexts[this.id] = this;
63                $element.bind(scrollEvent, function () {
64                    var scrollHandler;
65
66                    if (!(_this.didScroll || isTouch)) {
67                        _this.didScroll = true;
68                        scrollHandler = function () {
69                            _this.doScroll();
70                            return _this.didScroll = false;
71                        };
72                        return window.setTimeout(scrollHandler, $[wps].settings.scrollThrottle);
73                    }
74                });
75                $element.bind(resizeEvent, function () {
76                    var resizeHandler;
77
78                    if (!_this.didResize) {
79                        _this.didResize = true;
80                        resizeHandler = function () {
81                            $[wps]('refresh');
82                            return _this.didResize = false;
83                        };
84                        return window.setTimeout(resizeHandler, $[wps].settings.resizeThrottle);
85                    }
86                });
87            }
88
89            Context.prototype.doScroll = function () {
90                var axes,
91                        _this = this;
92
93                axes = {
94                    horizontal: {
95                        newScroll: this.$element.scrollLeft(),
96                        oldScroll: this.oldScroll.x,
97                        forward: 'right',
98                        backward: 'left'
99                    },
100                    vertical: {
101                        newScroll: this.$element.scrollTop(),
102                        oldScroll: this.oldScroll.y,
103                        forward: 'down',
104                        backward: 'up'
105                    }
106                };
107                if (isTouch && (!axes.vertical.oldScroll || !axes.vertical.newScroll)) {
108                    $[wps]('refresh');
109                }
110                $.each(axes, function (aKey, axis) {
111                    var direction, isForward, triggered;
112
113                    triggered = [];
114                    isForward = axis.newScroll > axis.oldScroll;
115                    direction = isForward ? axis.forward : axis.backward;
116                    $.each(_this.waypoints[aKey], function (wKey, waypoint) {
117                        var _ref, _ref1;
118
119                        if ((axis.oldScroll < (_ref = waypoint.offset) && _ref <= axis.newScroll)) {
120                            return triggered.push(waypoint);
121                        } else if ((axis.newScroll < (_ref1 = waypoint.offset) && _ref1 <= axis.oldScroll)) {
122                            return triggered.push(waypoint);
123                        }
124                    });
125                    triggered.sort(function (a, b) {
126                        return a.offset - b.offset;
127                    });
128                    if (!isForward) {
129                        triggered.reverse();
130                    }
131                    return $.each(triggered, function (i, waypoint) {
132                        if (waypoint.options.continuous || i === triggered.length - 1) {
133                            return waypoint.trigger([direction]);
134                        }
135                    });
136                });
137                return this.oldScroll = {
138                    x: axes.horizontal.newScroll,
139                    y: axes.vertical.newScroll
140                };
141            };
142
143            Context.prototype.refresh = function () {
144                var axes, cOffset, isWin,
145                        _this = this;
146
147                isWin = $.isWindow(this.element);
148                cOffset = this.$element.offset();
149                this.doScroll();
150                axes = {
151                    horizontal: {
152                        contextOffset: isWin ? 0 : cOffset.left,
153                        contextScroll: isWin ? 0 : this.oldScroll.x,
154                        contextDimension: this.$element.width(),
155                        oldScroll: this.oldScroll.x,
156                        forward: 'right',
157                        backward: 'left',
158                        offsetProp: 'left'
159                    },
160                    vertical: {
161                        contextOffset: isWin ? 0 : cOffset.top,
162                        contextScroll: isWin ? 0 : this.oldScroll.y,
163                        contextDimension: isWin ? $[wps]('viewportHeight') : this.$element.height(),
164                        oldScroll: this.oldScroll.y,
165                        forward: 'down',
166                        backward: 'up',
167                        offsetProp: 'top'
168                    }
169                };
170                return $.each(axes, function (aKey, axis) {
171                    return $.each(_this.waypoints[aKey], function (i, waypoint) {
172                        var adjustment, elementOffset, oldOffset, _ref, _ref1;
173
174                        adjustment = waypoint.options.offset;
175                        oldOffset = waypoint.offset;
176                        elementOffset = $.isWindow(waypoint.element) ? 0 : waypoint.$element.offset()[axis.offsetProp];
177                        if ($.isFunction(adjustment)) {
178                            adjustment = adjustment.apply(waypoint.element);
179                        } else if (typeof adjustment === 'string') {
180                            adjustment = parseFloat(adjustment);
181                            if (waypoint.options.offset.indexOf('%') > -1) {
182                                adjustment = Math.ceil(axis.contextDimension * adjustment / 100);
183                            }
184                        }
185                        waypoint.offset = elementOffset - axis.contextOffset + axis.contextScroll - adjustment;
186                        if ((waypoint.options.onlyOnScroll && (oldOffset != null)) || !waypoint.enabled) {
187                            return;
188                        }
189                        if (oldOffset !== null && (oldOffset < (_ref = axis.oldScroll) && _ref <= waypoint.offset)) {
190                            return waypoint.trigger([axis.backward]);
191                        } else if (oldOffset !== null && (oldOffset > (_ref1 = axis.oldScroll) && _ref1 >= waypoint.offset)) {
192                            return waypoint.trigger([axis.forward]);
193                        } else if (oldOffset === null && axis.oldScroll >= waypoint.offset) {
194                            return waypoint.trigger([axis.forward]);
195                        }
196                    });
197                });
198            };
199
200            Context.prototype.checkEmpty = function () {
201                if ($.isEmptyObject(this.waypoints.horizontal) && $.isEmptyObject(this.waypoints.vertical)) {
202                    this.$element.unbind([resizeEvent, scrollEvent].join(' '));
203                    return delete contexts[this.id];
204                }
205            };
206
207            return Context;
208
209        })();
210        Waypoint = (function () {
211            function Waypoint($element, context, options) {
212                var idList, _ref;
213
214                options = $.extend({}, $.fn[wp].defaults, options);
215                if (options.offset === 'bottom-in-view') {
216                    options.offset = function () {
217                        var contextHeight;
218
219                        contextHeight = $[wps]('viewportHeight');
220                        if (!$.isWindow(context.element)) {
221                            contextHeight = context.$element.height();
222                        }
223                        return contextHeight - $(this).outerHeight();
224                    };
225                }
226                this.$element = $element;
227                this.element = $element[0];
228                this.axis = options.horizontal ? 'horizontal' : 'vertical';
229                this.callback = options.handler;
230                this.context = context;
231                this.enabled = options.enabled;
232                this.id = 'waypoints' + waypointCounter++;
233                this.offset = null;
234                this.options = options;
235                context.waypoints[this.axis][this.id] = this;
236                allWaypoints[this.axis][this.id] = this;
237                idList = (_ref = $element.data(waypointKey)) != null ? _ref : [];
238                idList.push(this.id);
239                $element.data(waypointKey, idList);
240            }
241
242            Waypoint.prototype.trigger = function (args) {
243                if (!this.enabled) {
244                    return;
245                }
246                if (this.callback != null) {
247                    this.callback.apply(this.element, args);
248                }
249                if (this.options.triggerOnce) {
250                    return this.destroy();
251                }
252            };
253
254            Waypoint.prototype.disable = function () {
255                return this.enabled = false;
256            };
257
258            Waypoint.prototype.enable = function () {
259                this.context.refresh();
260                return this.enabled = true;
261            };
262
263            Waypoint.prototype.destroy = function () {
264                delete allWaypoints[this.axis][this.id];
265                delete this.context.waypoints[this.axis][this.id];
266                return this.context.checkEmpty();
267            };
268
269            Waypoint.getWaypointsByElement = function (element) {
270                var all, ids;
271
272                ids = $(element).data(waypointKey);
273                if (!ids) {
274                    return [];
275                }
276                all = $.extend({}, allWaypoints.horizontal, allWaypoints.vertical);
277                return $.map(ids, function (id) {
278                    return all[id];
279                });
280            };
281
282            return Waypoint;
283
284        })();
285        methods = {
286            init: function (f, options) {
287                var _ref;
288
289                if (options == null) {
290                    options = {};
291                }
292                if ((_ref = options.handler) == null) {
293                    options.handler = f;
294                }
295                this.each(function () {
296                    var $this, context, contextElement, _ref1;
297
298                    $this = $(this);
299                    contextElement = (_ref1 = options.context) != null ? _ref1 : $.fn[wp].defaults.context;
300                    if (!$.isWindow(contextElement)) {
301                        contextElement = $this.closest(contextElement);
302                    }
303                    contextElement = $(contextElement);
304                    context = contexts[contextElement.data(contextKey)];
305                    if (!context) {
306                        context = new Context(contextElement);
307                    }
308                    return new Waypoint($this, context, options);
309                });
310                $[wps]('refresh');
311                return this;
312            },
313            disable: function () {
314                return methods._invoke(this, 'disable');
315            },
316            enable: function () {
317                return methods._invoke(this, 'enable');
318            },
319            destroy: function () {
320                return methods._invoke(this, 'destroy');
321            },
322            prev: function (axis, selector) {
323                return methods._traverse.call(this, axis, selector, function (stack, index, waypoints) {
324                    if (index > 0) {
325                        return stack.push(waypoints[index - 1]);
326                    }
327                });
328            },
329            next: function (axis, selector) {
330                return methods._traverse.call(this, axis, selector, function (stack, index, waypoints) {
331                    if (index < waypoints.length - 1) {
332                        return stack.push(waypoints[index + 1]);
333                    }
334                });
335            },
336            _traverse: function (axis, selector, push) {
337                var stack, waypoints;
338
339                if (axis == null) {
340                    axis = 'vertical';
341                }
342                if (selector == null) {
343                    selector = window;
344                }
345                waypoints = jQMethods.aggregate(selector);
346                stack = [];
347                this.each(function () {
348                    var index;
349
350                    index = $.inArray(this, waypoints[axis]);
351                    return push(stack, index, waypoints[axis]);
352                });
353                return this.pushStack(stack);
354            },
355            _invoke: function ($elements, method) {
356                $elements.each(function () {
357                    var waypoints;
358
359                    waypoints = Waypoint.getWaypointsByElement(this);
360                    return $.each(waypoints, function (i, waypoint) {
361                        waypoint[method]();
362                        return true;
363                    });
364                });
365                return this;
366            }
367        };
368        $.fn[wp] = function () {
369            var args, method;
370
371            method = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
372            if (methods[method]) {
373                return methods[method].apply(this, args);
374            } else if ($.isFunction(method)) {
375                return methods.init.apply(this, arguments);
376            } else if ($.isPlainObject(method)) {
377                return methods.init.apply(this, [null, method]);
378            } else if (!method) {
379                return $.error("jQuery Waypoints needs a callback function or handler option.");
380            } else {
381                return $.error("The " + method + " method does not exist in jQuery Waypoints.");
382            }
383        };
384        $.fn[wp].defaults = {
385            context: window,
386            continuous: true,
387            enabled: true,
388            horizontal: false,
389            offset: 0,
390            triggerOnce: false
391        };
392        jQMethods = {
393            refresh: function () {
394                return $.each(contexts, function (i, context) {
395                    return context.refresh();
396                });
397            },
398            viewportHeight: function () {
399                var _ref;
400
401                return (_ref = window.innerHeight) != null ? _ref : $w.height();
402            },
403            aggregate: function (contextSelector) {
404                var collection, waypoints, _ref;
405
406                collection = allWaypoints;
407                if (contextSelector) {
408                    collection = (_ref = contexts[$(contextSelector).data(contextKey)]) != null ? _ref.waypoints : void 0;
409                }
410                if (!collection) {
411                    return [];
412                }
413                waypoints = {
414                    horizontal: [],
415                    vertical: []
416                };
417                $.each(waypoints, function (axis, arr) {
418                    $.each(collection[axis], function (key, waypoint) {
419                        return arr.push(waypoint);
420                    });
421                    arr.sort(function (a, b) {
422                        return a.offset - b.offset;
423                    });
424                    waypoints[axis] = $.map(arr, function (waypoint) {
425                        return waypoint.element;
426                    });
427                    return waypoints[axis] = $.unique(waypoints[axis]);
428                });
429                return waypoints;
430            },
431            above: function (contextSelector) {
432                if (contextSelector == null) {
433                    contextSelector = window;
434                }
435                return jQMethods._filter(contextSelector, 'vertical', function (context, waypoint) {
436                    return waypoint.offset <= context.oldScroll.y;
437                });
438            },
439            below: function (contextSelector) {
440                if (contextSelector == null) {
441                    contextSelector = window;
442                }
443                return jQMethods._filter(contextSelector, 'vertical', function (context, waypoint) {
444                    return waypoint.offset > context.oldScroll.y;
445                });
446            },
447            left: function (contextSelector) {
448                if (contextSelector == null) {
449                    contextSelector = window;
450                }
451                return jQMethods._filter(contextSelector, 'horizontal', function (context, waypoint) {
452                    return waypoint.offset <= context.oldScroll.x;
453                });
454            },
455            right: function (contextSelector) {
456                if (contextSelector == null) {
457                    contextSelector = window;
458                }
459                return jQMethods._filter(contextSelector, 'horizontal', function (context, waypoint) {
460                    return waypoint.offset > context.oldScroll.x;
461                });
462            },
463            enable: function () {
464                return jQMethods._invoke('enable');
465            },
466            disable: function () {
467                return jQMethods._invoke('disable');
468            },
469            destroy: function () {
470                return jQMethods._invoke('destroy');
471            },
472            extendFn: function (methodName, f) {
473                return methods[methodName] = f;
474            },
475            _invoke: function (method) {
476                var waypoints;
477
478                waypoints = $.extend({}, allWaypoints.vertical, allWaypoints.horizontal);
479                return $.each(waypoints, function (key, waypoint) {
480                    waypoint[method]();
481                    return true;
482                });
483            },
484            _filter: function (selector, axis, test) {
485                var context, waypoints;
486
487                context = contexts[$(selector).data(contextKey)];
488                if (!context) {
489                    return [];
490                }
491                waypoints = [];
492                $.each(context.waypoints[axis], function (i, waypoint) {
493                    if (test(context, waypoint)) {
494                        return waypoints.push(waypoint);
495                    }
496                });
497                waypoints.sort(function (a, b) {
498                    return a.offset - b.offset;
499                });
500                return $.map(waypoints, function (waypoint) {
501                    return waypoint.element;
502                });
503            }
504        };
505        $[wps] = function () {
506            var args, method;
507
508            method = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
509            if (jQMethods[method]) {
510                return jQMethods[method].apply(null, args);
511            } else {
512                return jQMethods.aggregate.call(null, method);
513            }
514        };
515        $[wps].settings = {
516            resizeThrottle: 100,
517            scrollThrottle: 30
518        };
519        return $w.load(function () {
520            return $[wps]('refresh');
521        });
522    });
523
524}).call(this);
525
526jQuery(window).load(function () {
527    if (jQuery().waypoint) {
528        jQuery('.t4p-progress-bar').waypoint(function () {
529            jQuery(this).css('visibility', 'visible');
530            jQuery('.t4p-progress-bar').each(function () {
531                var percentage = jQuery(this).find('.t4p-progress-bar-content').data('percentage');
532                jQuery(this).find('.t4p-progress-bar-content').css('width', '0%');
533                jQuery(this).find('.t4p-progress-bar-content').animate({
534                    width: percentage + '%'
535                }, 'slow');
536            });
537        }, {
538            triggerOnce: true,
539            offset: 'bottom-in-view'
540        });
541    }
542
543    if (jQuery().waypoint) {
544        jQuery('.counters-box').waypoint(function () {
545            jQuery(this).find('.display-percentage').each(function () {
546                var percentage = jQuery(this).data('percentage');
547                jQuery(this).countTo({from: 0, to: percentage, refreshInterval: 10, speed: 1000});
548            });
549        }, {
550            triggerOnce: true,
551            offset: 'bottom-in-view'
552        });
553    }
554
555
556    jQuery('.simple-products-slider .product-buttons a').text('Add to cart');
557
558    generateCarousel();
559
560    if (jQuery().waypoint) {
561        jQuery('.animated').waypoint(function () {
562
563            jQuery(this).css('visibility', 'visible');
564
565            // this code is executed for each appeared element
566            var animation_type = jQuery(this).attr('animation_type');
567            var animation_duration = jQuery(this).attr('animation_duration');
568
569            jQuery(this).addClass('animated	' + animation_type);
570
571            if (animation_duration) {
572                jQuery(this).css('-moz-animation-duration', animation_duration + 's');
573                jQuery(this).css('-webkit-animation-duration', animation_duration + 's');
574                jQuery(this).css('-ms-animation-duration', animation_duration + 's');
575                jQuery(this).css('-o-animation-duration', animation_duration + 's');
576                jQuery(this).css('animation-duration', animation_duration + 's');
577            }
578        }, {triggerOnce: true, offset: 'bottom-in-view'});
579    }
580
581    /**
582     * For Woocommerce product flexslider
583     */
584
585    if (jQuery('body .aside').css('display') == "block") {
586        jQuery('body').addClass('has-sidebar');
587    }
588
589    if (jQuery().flexslider && jQuery('.woocommerce .images #carousel').length >= 1) {
590        var WooThumbWidth = 100;
591        if (jQuery('body.woocommerce #sidebar').is(':visible')) {
592            wooThumbWidth = 100;
593        } else {
594            wooThumbWidth = 118;
595        }
596
597        if (typeof jQuery('.woocommerce .images #carousel').data('flexslider') !== 'undefined') {
598            jQuery('.woocommerce .images #carousel').flexslider('destroy');
599            jQuery('.woocommerce .images #slider').flexslider('destroy');
600        }
601
602        jQuery('.woocommerce .images #carousel').flexslider({
603            animation: 'slide',
604            controlNav: false,
605            directionNav: false,
606            animationLoop: false,
607            slideshow: false,
608            itemWidth: wooThumbWidth,
609            itemMargin: 9,
610            touch: false,
611            useCSS: false,
612            asNavFor: '.woocommerce .images #slider',
613            smoothHeight: false
614        });
615
616        jQuery('.woocommerce .images #slider').flexslider({
617            animation: 'slide',
618            controlNav: false,
619            animationLoop: false,
620            slideshow: false,
621            smoothHeight: true,
622            touch: true,
623            useCSS: false,
624            sync: '.woocommerce .images #carousel'
625        });
626    }
627
628});
629
630// **********************  Woocommerce  ****************************
631var generateCarousel = function () {
632    if (jQuery().carouFredSel) {
633        jQuery('.es-carousel-wrapper').not('.t4p-woo-featured-products-slider').each(function () {
634            jQuery(this).find('ul').carouFredSel({
635                auto: false,
636                prev: jQuery(this).find('.es-nav-prev'),
637                next: jQuery(this).find('.es-nav-next'),
638                width: '100%',
639                height: 'variable',
640                align: 'center',
641                onCreate: function (data) {
642                    jQuery(this).find('.image').css('visibility', 'visible');
643                }
644            });
645        });
646        jQuery('.t4p-woo-featured-products-slider').each(function () {
647            var carousel = jQuery(this).find('ul');
648            carousel.carouFredSel({
649                auto: false,
650                prev: jQuery(this).find('.es-nav-prev'),
651                next: jQuery(this).find('.es-nav-next'),
652                align: 'left',
653                left: 0,
654                width: '100%',
655                height: 'variable',
656                responsive: true,
657                items: {
658                    width: 280,
659                    height: 'variable',
660                    visible: {
661                        min: 1,
662                        max: 30
663                    }
664                },
665                onCreate: function (data) {
666                    jQuery(this).find('.image').css('visibility', 'visible');
667                    jQuery(this).parent().css('overflow', '');
668                }
669            });
670        });
671
672        jQuery('.simple-products-slider-variable').each(function () {
673            var carousel = jQuery(this).find('ul');
674            carousel.carouFredSel({
675                auto: false,
676                prev: jQuery(this).find('.es-nav-prev'),
677                next: jQuery(this).find('.es-nav-next'),
678                width: '100%',
679                height: 'variable',
680                align: 'center'
681            });
682        });
683    }
684};
685
686var calcTabsLayout = function (tab_selector) {
687    jQuery(tab_selector).each(function () {
688        var menuWidth = jQuery(this).parent().width();
689        var menuItems = jQuery(this).find('li').length;
690        var mod = menuWidth % menuItems;
691        var itemWidth = (menuWidth - mod) / menuItems;
692        var lastItemWidth = menuWidth - itemWidth * (menuItems - 1);
693        jQuery(this).css({'width': menuWidth + 'px'});
694        jQuery(this).find('li').css({'width': itemWidth + 'px'});
695
696        jQuery(this).find('li:last').css({'width': lastItemWidth + 'px'}).addClass('no-border-right');
697    });
698};
699
700var generateCarousel = function () {
701    if (jQuery().carouFredSel) {
702        jQuery('.clients-carousel').each(function () {
703            jQuery(this).find('ul').carouFredSel({
704                auto: false,
705                prev: jQuery(this).find('.es-nav-prev'),
706                next: jQuery(this).find('.es-nav-next'),
707                width: '100%',
708                height: 'variable',
709                align: 'center',
710            });
711        });
712
713        jQuery('.es-carousel-wrapper').each(function () {
714            jQuery(this).find('ul').carouFredSel({
715                auto: false,
716                prev: jQuery(this).find('.es-nav-prev'),
717                next: jQuery(this).find('.es-nav-next'),
718                width: '100%',
719                height: 'variable',
720                align: 'center',
721            });
722        });
723    }
724};
725
726// **********************  Counters Circle Shortcode  ****************************
727/**!
728 * easyPieChart
729 * Lightweight plugin to render simple, animated and retina optimized pie charts
730 *
731 * @license
732 * @author Robert Fleischmann <[email protected]> (http://robert-fleischmann.de)
733 * @version 2.1.3
734 **/
735
736(function (root, factory) {
737    if (typeof exports === 'object') {
738        module.exports = factory(require('jquery'));
739    } else if (typeof define === 'function' && define.amd) {
740        define(['jquery'], factory);
741    } else {
742        factory(root.jQuery);
743    }
744}(this, function ($) {
745    /**
746     * Renderer to render the chart on a canvas object
747     * @param {DOMElement} el      DOM element to host the canvas (root of the plugin)
748     * @param {object}     options options object of the plugin
749     */
750    var CanvasRenderer = function (el, options) {
751        var cachedBackground;
752        var canvas = document.createElement('canvas');
753
754        el.appendChild(canvas);
755
756        if (typeof (G_vmlCanvasManager) !== 'undefined') {
757            G_vmlCanvasManager.initElement(canvas);
758        }
759
760        var ctx = canvas.getContext('2d');
761
762        canvas.width = canvas.height = options.size;
763
764        // canvas on retina devices
765        var scaleBy = 1;
766        if (window.devicePixelRatio > 1) {
767            scaleBy = window.devicePixelRatio;
768            canvas.style.width = canvas.style.height = [options.size, 'px'].join('');
769            canvas.width = canvas.height = options.size * scaleBy;
770            ctx.scale(scaleBy, scaleBy);
771        }
772
773        // move 0,0 coordinates to the center
774        ctx.translate(options.size / 2, options.size / 2);
775
776        // rotate canvas -90deg
777        ctx.rotate((-1 / 2 + options.rotate / 180) * Math.PI);
778
779        var radius = (options.size - options.lineWidth) / 2;
780        if (options.scaleColor && options.scaleLength) {
781            radius -= options.scaleLength + 2; // 2 is the distance between scale and bar
782        }
783
784        // IE polyfill for Date
785        Date.now = Date.now || function () {
786            return +(new Date());
787        };
788
789        /**
790         * Draw a circle around the center of the canvas
791         * @param {strong} color     Valid CSS color string
792         * @param {number} lineWidth Width of the line in px
793         * @param {number} percent   Percentage to draw (float between -1 and 1)
794         */
795        var drawCircle = function (color, lineWidth, percent) {
796            percent = Math.min(Math.max(-1, percent || 0), 1);
797            var isNegative = percent <= 0 ? true : false;
798
799            ctx.beginPath();
800            ctx.arc(0, 0, radius, 0, Math.PI * 2 * percent, isNegative);
801
802            ctx.strokeStyle = color;
803            ctx.lineWidth = lineWidth;
804
805            ctx.stroke();
806        };
807
808        /**
809         * Draw the scale of the chart
810         */
811        var drawScale = function () {
812            var offset;
813            var length;
814
815            ctx.lineWidth = 1;
816            ctx.fillStyle = options.scaleColor;
817
818            ctx.save();
819            for (var i = 24; i > 0; --i) {
820                if (i % 6 === 0) {
821                    length = options.scaleLength;
822                    offset = 0;
823                } else {
824                    length = options.scaleLength * 0.6;
825                    offset = options.scaleLength - length;
826                }
827                ctx.fillRect(-options.size / 2 + offset, 0, length, 1);
828                ctx.rotate(Math.PI / 12);
829            }
830            ctx.restore();
831        };
832
833        /**
834         * Request animation frame wrapper with polyfill
835         * @return {function} Request animation frame method or timeout fallback
836         */
837        var reqAnimationFrame = (function () {
838            return  window.requestAnimationFrame ||
839                    window.webkitRequestAnimationFrame ||
840                    window.mozRequestAnimationFrame ||
841                    function (callback) {
842                        window.setTimeout(callback, 1000 / 60);
843                    };
844        }());
845
846        /**
847         * Draw the background of the plugin including the scale and the track
848         */
849        var drawBackground = function () {
850            if (options.scaleColor)
851                drawScale();
852            if (options.trackColor)
853                drawCircle(options.trackColor, options.lineWidth, 1);
854        };
855
856        /**
857         * Canvas accessor
858         */
859        this.getCanvas = function () {
860            return canvas;
861        };
862
863        /**
864         * Canvas 2D context 'ctx' accessor
865         */
866        this.getCtx = function () {
867            return ctx;
868        };
869
870        /**
871         * Clear the complete canvas
872         */
873        this.clear = function () {
874            ctx.clearRect(options.size / -2, options.size / -2, options.size, options.size);
875        };
876
877        /**
878         * Draw the complete chart
879         * @param {number} percent Percent shown by the chart between -100 and 100
880         */
881        this.draw = function (percent) {
882            // do we need to render a background
883            if (!!options.scaleColor || !!options.trackColor) {
884                // getImageData and putImageData are supported
885                if (ctx.getImageData && ctx.putImageData) {
886                    if (!cachedBackground) {
887                        drawBackground();
888                        cachedBackground = ctx.getImageData(0, 0, options.size * scaleBy, options.size * scaleBy);
889                    } else {
890                        ctx.putImageData(cachedBackground, 0, 0);
891                    }
892                } else {
893                    this.clear();
894                    drawBackground();
895                }
896            } else {
897                this.clear();
898            }
899
900            ctx.lineCap = options.lineCap;
901
902            // if barcolor is a function execute it and pass the percent as a value
903            var color;
904            if (typeof (options.barColor) === 'function') {
905                color = options.barColor(percent);
906            } else {
907                color = options.barColor;
908            }
909
910            // draw bar
911            drawCircle(color, options.lineWidth, percent / 100);
912        }.bind(this);
913
914        /**
915         * Animate from some percent to some other percentage
916         * @param {number} from Starting percentage
917         * @param {number} to   Final percentage
918         */
919        this.animate = function (from, to) {
920            var startTime = Date.now();
921            options.onStart(from, to);
922            var animation = function () {
923                var process = Math.min(Date.now() - startTime, options.animate.duration);
924                var currentValue = options.easing(this, process, from, to - from, options.animate.duration);
925                this.draw(currentValue);
926                options.onStep(from, to, currentValue);
927                if (process >= options.animate.duration) {
928                    options.onStop(from, to);
929                } else {
930                    reqAnimationFrame(animation);
931                }
932            }.bind(this);
933
934            reqAnimationFrame(animation);
935        }.bind(this);
936    };
937
938    var EasyPieChart = function (el, opts) {
939        var defaultOptions = {
940            barColor: '#ef1e25',
941            trackColor: '#f9f9f9',
942            scaleColor: '#dfe0e0',
943            scaleLength: 5,
944            lineCap: 'round',
945            lineWidth: 3,
946            size: 110,
947            rotate: 0,
948            animate: {
949                duration: 1000,
950                enabled: true
951            },
952            easing: function (x, t, b, c, d) { // more can be found here: http://gsgd.co.uk/sandbox/jquery/easing/
953                t = t / (d / 2);
954                if (t < 1) {
955                    return c / 2 * t * t + b;
956                }
957                return -c / 2 * ((--t) * (t - 2) - 1) + b;
958            },
959            onStart: function (from, to) {
960                return;
961            },
962            onStep: function (from, to, currentValue) {
963                return;
964            },
965            onStop: function (from, to) {
966                return;
967            }
968        };
969
970        // detect present renderer
971        if (typeof (CanvasRenderer) !== 'undefined') {
972            defaultOptions.renderer = CanvasRenderer;
973        } else if (typeof (SVGRenderer) !== 'undefined') {
974            defaultOptions.renderer = SVGRenderer;
975        } else {
976            throw new Error('Please load either the SVG- or the CanvasRenderer');
977        }
978
979        var options = {};
980        var currentValue = 0;
981
982        /**
983         * Initialize the plugin by creating the options object and initialize rendering
984         */
985        var init = function () {
986            this.el = el;
987            this.options = options;
988
989            // merge user options into default options
990            for (var i in defaultOptions) {
991                if (defaultOptions.hasOwnProperty(i)) {
992                    options[i] = opts && typeof (opts[i]) !== 'undefined' ? opts[i] : defaultOptions[i];
993                    if (typeof (options[i]) === 'function') {
994                        options[i] = options[i].bind(this);
995                    }
996                }
997            }
998
999            // check for jQuery easing
1000            if (typeof (options.easing) === 'string' && typeof (jQuery) !== 'undefined' && jQuery.isFunction(jQuery.easing[options.easing])) {
1001                options.easing = jQuery.easing[options.easing];
1002            } else {
1003                options.easing = defaultOptions.easing;
1004            }
1005
1006            // process earlier animate option to avoid bc breaks
1007            if (typeof (options.animate) === 'number') {
1008                options.animate = {
1009                    duration: options.animate,
1010                    enabled: true
1011                };
1012            }
1013
1014            if (typeof (options.animate) === 'boolean' && !options.animate) {
1015                options.animate = {
1016                    duration: 1000,
1017                    enabled: options.animate
1018                };
1019            }
1020
1021            // create renderer
1022            this.renderer = new options.renderer(el, options);
1023
1024            // initial draw
1025            this.renderer.draw(currentValue);
1026
1027            // initial update
1028            if (el.dataset && el.dataset.percent) {
1029                this.update(parseFloat(el.dataset.percent));
1030            } else if (el.getAttribute && el.getAttribute('data-percent')) {
1031                this.update(parseFloat(el.getAttribute('data-percent')));
1032            }
1033        }.bind(this);
1034
1035        /**
1036         * Update the value of the chart
1037         * @param  {number} newValue Number between 0 and 100
1038         * @return {object}          Instance of the plugin for method chaining
1039         */
1040        this.update = function (newValue) {
1041            newValue = parseFloat(newValue);
1042            if (options.animate.enabled) {
1043                this.renderer.animate(currentValue, newValue);
1044            } else {
1045                this.renderer.draw(newValue);
1046            }
1047            currentValue = newValue;
1048            return this;
1049        }.bind(this);
1050
1051        /**
1052         * Disable animation
1053         * @return {object} Instance of the plugin for method chaining
1054         */
1055        this.disableAnimation = function () {
1056            options.animate.enabled = false;
1057            return this;
1058        };
1059
1060        /**
1061         * Enable animation
1062         * @return {object} Instance of the plugin for method chaining
1063         */
1064        this.enableAnimation = function () {
1065            options.animate.enabled = true;
1066            return this;
1067        };
1068
1069        init();
1070    };
1071
1072    $.fn.easyPieChart = function (options) {
1073        return this.each(function () {
1074            var instanceOptions;
1075
1076            if (!$.data(this, 'easyPieChart')) {
1077                instanceOptions = $.extend({}, options, $(this).data());
1078                $.data(this, 'easyPieChart', new EasyPieChart(this, instanceOptions));
1079            }
1080        });
1081    };
1082
1083}));
1084
1085// **********************  From custom_main.js  ****************************
1086
1087/**
1088 * User agent
1089 * http://cssuseragent.org/
1090 */
1091var cssua = function (n, l, p) {
1092    var q = /\s*([\-\w ]+)[\s\/\:]([\d_]+\b(?:[\-\._\/]\w+)*)/, r = /([\w\-\.]+[\s\/][v]?[\d_]+\b(?:[\-\._\/]\w+)*)/g, s = /\b(?:(blackberry\w*|bb10)|(rim tablet os))(?:\/(\d+\.\d+(?:\.\w+)*))?/, t = /\bsilk-accelerated=true\b/, u = /\bfluidapp\b/, v = /(\bwindows\b|\bmacintosh\b|\blinux\b|\bunix\b)/, w = /(\bandroid\b|\bipad\b|\bipod\b|\bwindows phone\b|\bwpdesktop\b|\bxblwp7\b|\bzunewp7\b|\bwindows ce\b|\bblackberry\w*|\bbb10\b|\brim tablet os\b|\bmeego|\bwebos\b|\bpalm|\bsymbian|\bj2me\b|\bdocomo\b|\bpda\b|\bchtml\b|\bmidp\b|\bcldc\b|\w*?mobile\w*?|\w*?phone\w*?)/,
1093            x = /(\bxbox\b|\bplaystation\b|\bnintendo\s+\w+)/, k = {parse: function (b, d) {
1094                    var a = {};
1095                    d && (a.standalone = d);
1096                    b = ("" + b).toLowerCase();
1097                    if (!b)
1098                        return a;
1099                    for (var c, e, g = b.split(/[()]/), f = 0, k = g.length; f < k; f++)
1100                        if (f % 2) {
1101                            var m = g[f].split(";");
1102                            c = 0;
1103                            for (e = m.length; c < e; c++)
1104                                if (q.exec(m[c])) {
1105                                    var h = RegExp.$1.split(" ").join("_"), l = RegExp.$2;
1106                                    if (!a[h] || parseFloat(a[h]) < parseFloat(l))
1107                                        a[h] = l
1108                                }
1109                        } else if (m = g[f].match(r))
1110                            for (c = 0, e = m.length; c < e; c++)
1111                                h = m[c].split(/[\/\s]+/), h.length && "mozilla" !== h[0] && (a[h[0].split(" ").join("_")] = h.slice(1).join("-"));
1112                    w.exec(b) ? (a.mobile = RegExp.$1, s.exec(b) && (delete a[a.mobile], a.blackberry = a.version || RegExp.$3 || RegExp.$2 || RegExp.$1, RegExp.$1 ? a.mobile = "blackberry" : "0.0.1" === a.version && (a.blackberry = "7.1.0.0"))) : v.exec(b) ? a.desktop = RegExp.$1 : x.exec(b) && (a.game = RegExp.$1, c = a.game.split(" ").join("_"), a.version && !a[c] && (a[c] = a.version));
1113                    a.intel_mac_os_x ? (a.mac_os_x = a.intel_mac_os_x.split("_").join("."), delete a.intel_mac_os_x) : a.cpu_iphone_os ? (a.ios = a.cpu_iphone_os.split("_").join("."), delete a.cpu_iphone_os) : a.cpu_os ?
1114                            (a.ios = a.cpu_os.split("_").join("."), delete a.cpu_os) : "iphone" !== a.mobile || a.ios || (a.ios = "1");
1115                    a.opera && a.version ? (a.opera = a.version, delete a.blackberry) : t.exec(b) ? a.silk_accelerated = !0 : u.exec(b) && (a.fluidapp = a.version);
1116                    if (a.applewebkit)
1117                        a.webkit = a.applewebkit, delete a.applewebkit, a.opr && (a.opera = a.opr, delete a.opr, delete a.chrome), a.safari && (a.chrome || a.crios || a.opera || a.silk || a.fluidapp || a.phantomjs || a.mobile && !a.ios ? delete a.safari : a.safari = a.version && !a.rim_tablet_os ? a.version : {419: "2.0.4", 417: "2.0.3",
1118                            416: "2.0.2", 412: "2.0", 312: "1.3", 125: "1.2", 85: "1.0"}[parseInt(a.safari, 10)] || a.safari);
1119                    else if (a.msie || a.trident)
1120                        if (a.opera || (a.ie = a.msie || a.rv), delete a.msie, a.windows_phone_os)
1121                            a.windows_phone = a.windows_phone_os, delete a.windows_phone_os;
1122                        else {
1123                            if ("wpdesktop" === a.mobile || "xblwp7" === a.mobile || "zunewp7" === a.mobile)
1124                                a.mobile = "windows desktop", a.windows_phone = 9 > +a.ie ? "7.0" : 10 > +a.ie ? "7.5" : "8.0", delete a.windows_nt
1125                        }
1126                    else if (a.gecko || a.firefox)
1127                        a.gecko = a.rv;
1128                    a.rv && delete a.rv;
1129                    a.version && delete a.version;
1130                    return a
1131                },
1132                format: function (b) {
1133                    var d = "", a;
1134                    for (a in b)
1135                        if (a && b.hasOwnProperty(a)) {
1136                            var c = a, e = b[a], c = c.split(".").join("-"), g = " ua-" + c;
1137                            if ("string" === typeof e) {
1138                                for (var e = e.split(" ").join("_").split(".").join("-"), f = e.indexOf("-"); 0 < f; )
1139                                    g += " ua-" + c + "-" + e.substring(0, f), f = e.indexOf("-", f + 1);
1140                                g += " ua-" + c + "-" + e
1141                            }
1142                            d += g
1143                        }
1144                    return d
1145                }, encode: function (b) {
1146                    var d = "", a;
1147                    for (a in b)
1148                        a && b.hasOwnProperty(a) && (d && (d += "\x26"), d += encodeURIComponent(a) + "\x3d" + encodeURIComponent(b[a]));
1149                    return d
1150                }};
1151    k.userAgent = k.ua = k.parse(l, p);
1152    l = k.format(k.ua) +
1153            " js";
1154    n.className = n.className ? n.className.replace(/\bno-js\b/g, "") + l : l.substr(1);
1155    return k
1156}(document.documentElement, navigator.userAgent, navigator.standalone);
1157
1158/* jQuery CounTo */
1159
1160(function (a) {
1161    a.fn.countTo = function (g) {
1162        g = g || {};
1163        return a(this).each(function () {
1164            function e(a) {
1165                a = b.formatter.call(h, a, b);
1166                f.html(a)
1167            }
1168            var b = a.extend({}, a.fn.countTo.defaults, {from: a(this).data("from"), to: a(this).data("to"), speed: a(this).data("speed"), refreshInterval: a(this).data("refresh-interval"), decimals: a(this).data("decimals")}, g), j = Math.ceil(b.speed / b.refreshInterval), l = (b.to - b.from) / j, h = this, f = a(this), k = 0, c = b.from, d = f.data("countTo") || {};
1169            f.data("countTo", d);
1170            d.interval && clearInterval(d.interval);
1171            d.interval =
1172                    setInterval(function () {
1173                        c += l;
1174                        k++;
1175                        e(c);
1176                        "function" == typeof b.onUpdate && b.onUpdate.call(h, c);
1177                        k >
1177= j && (f.removeData("countTo"), clearInterval(d.interval), c = b.to, "function" == typeof b.onComplete && b.onComplete.call(h, c))
1178                    }, b.refreshInterval);
1179            e(c)
1180        })
1181    };
1182    a.fn.countTo.defaults = {from: 0, to: 0, speed: 1E3, refreshInterval: 100, decimals: 0, formatter: function (a, e) {
1183            return a.toFixed(e.decimals)
1184        }, onUpdate: null, onComplete: null}
1185})(jQuery);
1186
1187(function (jQuery) {
1188
1189    "use strict";
1190
1191    // animate counter boxes
1192    jQuery.fn.t4p_box_counting = function () {
1193        var count_value = jQuery(this).data('value');
1194        var count_direction = jQuery(this).data('direction');
1195
1196        if (count_direction == 'down') {
1197            jQuery(this).countTo({from: count_value, to: 0, refreshInterval: 10, speed: 1000});
1198        } else {
1199            jQuery(this).countTo({from: 0, to: count_value, refreshInterval: 10, speed: 1000});
1200        }
1201    };
1202
1203    // animate counter circles
1204    jQuery.fn.t4p_draw_circles = function () {
1205        var circle = jQuery(this);
1206        var countdown = circle.children('.counter-circle').attr('data-countdown');
1207        var filledcolor = circle.children('.counter-circle').attr('data-filledcolor');
1208        var unfilledcolor = circle.children('.counter-circle').attr('data-unfilledcolor');
1209        var scale = circle.children('.counter-circle').attr('data-scale');
1210        var size = circle.children('.counter-circle').attr('data-size');
1211        var speed = circle.children('.counter-circle').attr('data-speed');
1212        var stroksize = circle.children('.counter-circle').attr('data-strokesize');
1213
1214        var percentage = circle.children('.counter-circle').attr('data-percent');
1215
1216        if (scale) {
1217            scale = jQuery('body').css('color');
1218        }
1219
1220        if (countdown) {
1221            circle.children('.counter-circle').attr('data-percent', 100);
1222
1223            circle.children('.counter-circle').easyPieChart({
1224                barColor: filledcolor,
1225                trackColor: unfilledcolor,
1226                scaleColor: scale,
1227                scaleLength: 5,
1228                lineCap: 'round',
1229                lineWidth: stroksize,
1230                size: size,
1231                rotate: 0,
1232                animate: {
1233                    duration: speed, enabled: true
1234                }
1235            });
1236            circle.children('.counter-circle').data('easyPieChart').enableAnimation();
1237            circle.children('.counter-circle').data('easyPieChart').update(percentage);
1238        } else {
1239            circle.children('.counter-circle').easyPieChart({
1240                barColor: filledcolor,
1241                trackColor: unfilledcolor,
1242                scaleColor: scale,
1243                scaleLength: 5,
1244                lineCap: 'round',
1245                lineWidth: stroksize,
1246                size: size,
1247                rotate: 0,
1248                animate: {
1249                    duration: speed, enabled: true
1250                }
1251            });
1252        }
1253    };
1254
1255    // set flip boxes equal front/back height
1256    jQuery.fn.t4p_setup_flip_boxes = function () {
1257        var flip_box = jQuery(this);
1258        var outer_height, height, top_margin = 0;
1259
1260        if (flip_box.find('.flip-box-front').outerHeight() > flip_box.find('.flip-box-back').outerHeight()) {
1261            outer_height = flip_box.find('.flip-box-front').outerHeight();
1262            height = flip_box.find('.flip-box-front').height();
1263            top_margin = (height - flip_box.find('.flip-box-back-inner').outerHeight()) / 2;
1264
1265            flip_box.find('.flip-box-back').css('min-height', outer_height);
1266            flip_box.css('min-height', outer_height);
1267            flip_box.find('.flip-box-back-inner').css('margin-top', top_margin);
1268        } else {
1269            outer_height = flip_box.find('.flip-box-back').outerHeight();
1270            height = flip_box.find('.flip-box-back').height();
1271            top_margin = (height - flip_box.find('.flip-box-front-inner').outerHeight()) / 2;
1272
1273            flip_box.find('.flip-box-front').css('min-height', outer_height);
1274            flip_box.css('min-height', outer_height);
1275            flip_box.find('.flip-box-front-inner').css('margin-top', top_margin);
1276        }
1277    };
1278
1279    // animate progress bar
1280    jQuery.fn.t4p_draw_progress = function () {
1281        var progressbar = jQuery(this);
1282        if (jQuery('html').hasClass('lt-ie9')) {
1283            progressbar.css('visibility', 'visible');
1284            progressbar.each(function () {
1285                var percentage = progressbar.find('.t4p-progress').attr("aria-valuenow");
1286                progressbar.find('.t4p-progress').css('width', '0%');
1287                progressbar.find('.t4p-progress').animate({
1288                    width: percentage + '%'
1289                }, 'slow');
1290            });
1291        } else {
1292            progressbar.find('.t4p-progress').css("width", function () {
1293                return jQuery(this).attr("aria-valuenow") + "%";
1294            });
1295        }
1296    };
1297
1298})(jQuery);
1299
1300/*!
1301 * jQuery Cycle Lite Plugin
1302 * http://malsup.com/jquery/cycle/lite/
1303 * Copyright (c) 2008-2012 M. Alsup
1304 * Version: 1.7 (20-FEB-2013)
1305 * Dual licensed under the MIT and GPL licenses:
1306 * http://www.opensource.org/licenses/mit-license.php
1307 * http://www.gnu.org/licenses/gpl.html
1308 * Requires: jQuery v1.3.2 or later
1309 */
1310;
1311(function ($) {
1312    "use strict";
1313
1314    var ver = 'Lite-1.7';
1315    var msie = /MSIE/.test(navigator.userAgent);
1316
1317    $.fn.cycle = function (options) {
1318        return this.each(function () {
1319            options = options || {};
1320
1321            if (this.cycleTimeout)
1322                clearTimeout(this.cycleTimeout);
1323
1324            this.cycleTimeout = 0;
1325            this.cyclePause = 0;
1326
1327            var $cont = $(this);
1328            var $slides = options.slideExpr ? $(options.slideExpr, this) : $cont.children();
1329            var els = $slides.get();
1330            if (els.length < 2) {
1331                if (window.console)
1332                    console.log('terminating; too few slides: ' + els.length);
1333                return; // don't bother
1334            }
1335
1336            // support metadata plugin (v1.0 and v2.0)
1337            var opts = $.extend({}, $.fn.cycle.defaults, options || {}, $.metadata ? $cont.metadata() : $.meta ? $cont.data() : {});
1338            var meta = $.isFunction($cont.data) ? $cont.data(opts.metaAttr) : null;
1339            if (meta)
1340                opts = $.extend(opts, meta);
1341
1342            opts.before = opts.before ? [opts.before] : [];
1343            opts.after = opts.after ? [opts.after] : [];
1344            opts.after.unshift(function () {
1345                opts.busy = 0;
1346            });
1347
1348            // allow shorthand overrides of width, height and timeout
1349            var cls = this.className;
1350            opts.width = parseInt((cls.match(/w:(\d+)/) || [])[1], 10) || opts.width;
1351            opts.height = parseInt((cls.match(/h:(\d+)/) || [])[1], 10) || opts.height;
1352            opts.timeout = parseInt((cls.match(/t:(\d+)/) || [])[1], 10) || opts.timeout;
1353
1354            if ($cont.css('position') == 'static')
1355                $cont.css('position', 'relative');
1356            if (opts.width)
1357                $cont.width(opts.width);
1358            if (opts.height && opts.height != 'auto')
1359                $cont.height(opts.height);
1360
1361            var first = 0;
1362            $slides.css({position: 'absolute', top: 0}).each(function (i) {
1363                $(this).css('z-index', els.length - i);
1364            });
1365
1366            $(els[first]).css('opacity', 1).show(); // opacity bit needed to handle reinit case
1367            if (msie)
1368                els[first].style.removeAttribute('filter');
1369
1370            if (opts.fit && opts.width)
1371                $slides.width(opts.width);
1372            if (opts.fit && opts.height && opts.height != 'auto')
1373                $slides.height(opts.height);
1374            if (opts.pause)
1375                $cont.hover(function () {
1376                    this.cyclePause = 1;
1377                }, function () {
1378                    this.cyclePause = 0;
1379                });
1380
1381            var txFn = $.fn.cycle.transitions[opts.fx];
1382            if (txFn)
1383                txFn($cont, $slides, opts);
1384
1385            $slides.each(function () {
1386                var $el = $(this);
1387                this.cycleH = (opts.fit && opts.height) ? opts.height : $el.height();
1388                this.cycleW = (opts.fit && opts.width) ? opts.width : $el.width();
1389            });
1390
1391            if (opts.cssFirst)
1392                $($slides[first]).css(opts.cssFirst);
1393
1394            if (opts.timeout) {
1395                // ensure that timeout and speed settings are sane
1396                if (opts.speed.constructor == String)
1397                    opts.speed = {slow: 600, fast: 200}[opts.speed] || 400;
1398                if (!opts.sync)
1399                    opts.speed = opts.speed / 2;
1400                while ((opts.timeout - opts.speed) < 250)
1401                    opts.timeout += opts.speed;
1402            }
1403            opts.speedIn = opts.speed;
1404            opts.speedOut = opts.speed;
1405
1406            opts.slideCount = els.length;
1407            opts.currSlide = first;
1408            opts.nextSlide = 1;
1409
1410            // fire artificial events
1411            var e0 = $slides[first];
1412            if (opts.before.length)
1413                opts.before[0].apply(e0, [e0, e0, opts, true]);
1414            if (opts.after.length > 1)
1415                opts.after[1].apply(e0, [e0, e0, opts, true]);
1416
1417            if (opts.click && !opts.next)
1418                opts.next = opts.click;
1419            if (opts.next)
1420                $(opts.next).unbind('click.cycle').bind('click.cycle', function () {
1421                    return advance(els, opts, opts.rev ? -1 : 1);
1422                });
1423            if (opts.prev)
1424                $(opts.prev).unbind('click.cycle').bind('click.cycle', function () {
1425                    return advance(els, opts, opts.rev ? 1 : -1);
1426                });
1427
1428            if (opts.timeout)
1429                this.cycleTimeout = setTimeout(function () {
1430                    go(els, opts, 0, !opts.rev);
1431                }, opts.timeout + (opts.delay || 0));
1432        });
1433    };
1434
1435    function go(els, opts, manual, fwd) {
1436        if (opts.busy)
1437            return;
1438        var p = els[0].parentNode, curr = els[opts.currSlide], next = els[opts.nextSlide];
1439        if (p.cycleTimeout === 0 && !manual)
1440            return;
1441
1442        if (manual || !p.cyclePause) {
1443            if (opts.before.length)
1444                $.each(opts.before, function (i, o) {
1445                    o.apply(next, [curr, next, opts, fwd]);
1446                });
1447            var after = function () {
1448                if (msie)
1449                    this.style.removeAttribute('filter');
1450                $.each(opts.after, function (i, o) {
1451                    o.apply(next, [curr, next, opts, fwd]);
1452                });
1453                queueNext(opts);
1454            };
1455
1456            if (opts.nextSlide != opts.currSlide) {
1457                opts.busy = 1;
1458                $.fn.cycle.custom(curr, next, opts, after);
1459            }
1460            var roll = (opts.nextSlide + 1) == els.length;
1461            opts.nextSlide = roll ? 0 : opts.nextSlide + 1;
1462            opts.currSlide = roll ? els.length - 1 : opts.nextSlide - 1;
1463        } else {
1464            queueNext(opts);
1465        }
1466
1467        function queueNext(opts) {
1468            if (opts.timeout)
1469                p.cycleTimeout = setTimeout(function () {
1470                    go(els, opts, 0, !opts.rev);
1471                }, opts.timeout);
1472        }
1473    }
1474
1475// advance slide forward or back
1476    function advance(els, opts, val) {
1477        var p = els[0].parentNode, timeout = p.cycleTimeout;
1478        if (timeout) {
1479            clearTimeout(timeout);
1480            p.cycleTimeout = 0;
1481        }
1482        opts.nextSlide = opts.currSlide + val;
1483        if (opts.nextSlide < 0) {
1484            opts.nextSlide = els.length - 1;
1485        } else if (opts.nextSlide >= els.length) {
1486            opts.nextSlide = 0;
1487        }
1488        go(els, opts, 1, val >= 0);
1489        return false;
1490    }
1491
1492    $.fn.cycle.custom = function (curr, next, opts, cb) {
1493        var $l = $(curr), $n = $(next);
1494        $n.css(opts.cssBefore);
1495        var fn = function () {
1496            $n.animate(opts.animIn, opts.speedIn, opts.easeIn, cb);
1497        };
1498        $l.animate(opts.animOut, opts.speedOut, opts.easeOut, function () {
1499            $l.css(opts.cssAfter);
1500            if (!opts.sync)
1501                fn();
1502        });
1503        if (opts.sync)
1504            fn();
1505    };
1506
1507    $.fn.cycle.transitions = {
1508        fade: function ($cont, $slides, opts) {
1509            $slides.not(':eq(0)').hide();
1510            opts.cssBefore = {opacity: 0, display: 'block'};
1511            opts.cssAfter = {display: 'none'};
1512            opts.animOut = {opacity: 0};
1513            opts.animIn = {opacity: 1};
1514        },
1515        fadeout: function ($cont, $slides, opts) {
1516            opts.before.push(function (curr, next, opts, fwd) {
1517                $(curr).css('zIndex', opts.slideCount + (fwd === true ? 1 : 0));
1518                $(next).css('zIndex', opts.slideCount + (fwd === true ? 0 : 1));
1519            });
1520            $slides.not(':eq(0)').hide();
1521            opts.cssBefore = {opacity: 1, display: 'block', zIndex: 1};
1522            opts.cssAfter = {display: 'none', zIndex: 0};
1523            opts.animOut = {opacity: 0};
1524            opts.animIn = {opacity: 1};
1525        }
1526    };
1527
1528    $.fn.cycle.ver = function () {
1529        return ver;
1530    };
1531
1532// @see: http://malsup.com/jquery/cycle/lite/
1533    $.fn.cycle.defaults = {
1534        animIn: {},
1535        animOut: {},
1536        fx: 'fade',
1537        after: null,
1538        before: null,
1539        cssBefore: {},
1540        cssAfter: {},
1541        delay: 0,
1542        fit: 0,
1543        height: 'auto',
1544        metaAttr: 'cycle',
1545        next: null,
1546        pause: false,
1547        prev: null,
1548        speed: 1000,
1549        slideExpr: null,
1550        sync: true,
1551        timeout: 4000
1552    };
1553
1554})(jQuery);
1555
1556jQuery(window).load(function () {
1557    // Counters Box
1558    jQuery('.t4p-counter-box').not('.t4p-modal .t4p-counter-box').waypoint(function () {
1559        jQuery(this).find('.display-counter').each(function () {
1560            jQuery(this).t4p_box_counting();
1561        });
1562    }, {
1563        triggerOnce: true,
1564        offset: 'bottom-in-view'
1565    });
1566
1567    jQuery('.t4p-modal .t4p-counter-box').each(function () {
1568        jQuery(this).appear(function () {
1569            jQuery(this).find('.display-counter').each(function () {
1570                jQuery(this).t4p_box_counting();
1571            });
1572        });
1573    });
1574
1575    // Counter Circles
1576    jQuery('.counter-circle-wrapper').not('.t4p-modal .counter-circle-wrapper').waypoint(function () {
1577        jQuery(this).t4p_draw_circles();
1578    }, {
1579        triggerOnce: true,
1580        offset: 'bottom-in-view'
1581    });
1582
1583    jQuery('.t4p-modal .counter-circle-wrapper').each(function () {
1584        jQuery(this).appear(function () {
1585            jQuery(this).t4p_draw_circles();
1586        });
1587    });
1588
1589    // Flip Boxes
1590    jQuery('.flip-box-inner-wrapper').each(function () {
1591        jQuery(this).t4p_setup_flip_boxes();
1592    });
1593
1594    // Progressbar
1595    jQuery('.t4p-progressbar').not('.t4p-modal .t4p-progressbar').waypoint(function () {
1596        jQuery(this).t4p_draw_progress();
1597    }, {
1598        triggerOnce: true,
1599        offset: 'bottom-in-view'
1600    });
1601
1602    jQuery('.t4p-modal .t4p-progressbar').each(function () {
1603        jQuery(this).appear(function () {
1604            jQuery(this).t4p_draw_progress();
1605        });
1606    });
1607
1608    // Testimonials
1609    function onAfter(curr, next, opts, fwd) {
1610        var $ht = jQuery(this).height();
1611
1612        //set the container's height to that of the current slide
1613        jQuery(this).parent().css('height', $ht);
1614    }
1615
1616    if (jQuery().cycle) {
1617        var reviews_cycle_args = {
1618            fx: 'fade',
1619            after: onAfter,
1620            delay: 0
1621        };
1622
1623        if (typeof(js_local_vars) != "undefined" && js_local_vars.testimonials_speed) {
1624            reviews_cycle_args.timeout = parseInt(js_local_vars.testimonials_speed);
1625        } else {
1626            reviews_cycle_args.timeout = parseInt(4000);
1627        }
1628        
1629        jQuery('.reviews').cycle(reviews_cycle_args);
1630    }
1631
1632    // Toggles
1633    jQuery('.t4p-accordian .panel-title a').on('click', function (e) {
1634        if (jQuery(this).hasClass('active')) {
1635            jQuery(this).parents('.t4p-accordian ').find('.panel-title a').removeClass('active');
1636            jQuery(this).parents('.t4p-accordian ').find('.panel-collapse').removeClass('in');
1637            jQuery(this).parents('.t4p-accordian ').find('.panel-collapse').attr("aria-expanded", "false");
1638            return false; 
1639        } else {
1640            jQuery(this).parents('.t4p-accordian ').find('.panel-title a').removeClass('active');
1641            jQuery(this).parents('.t4p-accordian ').find('.panel-collapse').removeClass('in');
1642            jQuery(this).addClass('active');
1643
1644            jQuery(this).parents('.panel').find('.panel-body .shortcode-map').each(function () {
1645                jQuery("#" + this.id).goMap();
1646                marker = jQuery.goMap.markers[0];
1647                if (marker) {
1648                    info = jQuery.goMap.getInfo(marker);
1649                    jQuery.goMap.setInfo(marker, info);
1650                }
1651                var center = jQuery.goMap.getMap().getCenter();
1652                google.maps.event.trigger(jQuery.goMap.getMap(), 'resize');
1653                jQuery.goMap.getMap().setCenter(center);
1654            });
1655        }
1656
1657        generateCarousel();
1658
1659        if (jQuery('.portfolio').length) {
1660            jQuery('.portfolio-wrapper').isotope('reLayout');
1661        }
1662        
1663    });
1664
1665    // Initialize Bootstrap Modals
1666    jQuery('.t4p-modal').each(function () {
1667        jQuery('#wrapper').append(jQuery(this));
1668    });
1669
1670    jQuery('.t4p-modal').bind('hidden.bs.modal', function () {
1671        jQuery('html').css('overflow', '');
1672    });
1673
1674    jQuery('.t4p-modal').bind('show.bs.modal', function () {
1675        jQuery('html').css('overflow', 'visible');
1676    });
1677
1678    if (jQuery('.t4p-slider').data('parallax') == 1) {
1679        jQuery('.t4p-modal').css('top', jQuery('.header-wrapper').height());
1680    }
1681
1682    jQuery('.t4p-hook-modal a').click(function (e) {
1683        e.preventDefault();
1684    });
1685
1686    if (cssua.ua.mobile || cssua.ua.tablet_pc) {
1687        jQuery('.t4p-popover, .t4p-tooltip').each(function () {
1688            jQuery(this).attr('data-trigger', 'click');
1689            jQuery(this).data('trigger', 'click');
1690        });
1691    }
1692
1693    // Initialize Bootstrap Popovers
1694    jQuery('[data-toggle~="popover"]').popover({
1695        container: 'body'
1696    });
1697
1698    // Initialize Bootstrap Tabs
1699    // Initialize vertical tabs content container height
1700    if (jQuery('.vertical-tabs').length >= 1) {
1701        jQuery('.vertical-tabs .tab-content .tab-pane').css('min-height', jQuery('.vertical-tabs .nav-tabs').outerHeight());
1702    }
1703
1704    jQuery(window).on('resize', function () {
1705        if (jQuery('.vertical-tabs').length >= 1) {
1706            jQuery('.vertical-tabs .tab-content .tab-pane').css('min-height', jQuery('.vertical-tabs .nav-tabs').outerHeight());
1707        }
1708    });
1709
1710    // Initialize Bootstrap Tooltip
1711    jQuery('[data-toggle~="tooltip"]').tooltip({
1712        container: 'body'
1713    });
1714
1715    generateCarousel();
1716
1717    if (jQuery().waypoint) {
1718        jQuery('.t4p-animated').waypoint(function () {
1719
1720            jQuery(this).css('visibility', 'visible');
1721
1722            // this code is executed for each appeared element
1723            var animation_type = jQuery(this).data('animationtype');
1724            var animation_duration = jQuery(this).data('animationduration');
1725
1726            jQuery(this).addClass('animated-	' + animation_type);
1727
1728            if (animation_duration) {
1729                jQuery(this).css('-moz-animation-duration', animation_duration + 's');
1730                jQuery(this).css('-webkit-animation-duration', animation_duration + 's');
1731                jQuery(this).css('-ms-animation-duration', animation_duration + 's');
1732                jQuery(this).css('-o-animation-duration', animation_duration + 's');
1733                jQuery(this).css('animation-duration', animation_duration + 's');
1734            }
1735        }, {triggerOnce: true, offset: 'bottom-in-view'});
1736    }
1737
1738});
1739
1740jQuery(document).ready(function ($) {
1741
1742    setTimeout(function () {
1743        jQuery('.flip-box-inner-wrapper .fa').addClass('finished-animating');
1744    }, 5000);
1745
1746    jQuery('.t4p-flip-box').mouseover(function () {
1747        jQuery(this).addClass('hover');
1748    });
1749
1750    jQuery('.t4p-flip-box').mouseout(function () {
1751        jQuery(this).removeClass('hover');
1752    });
1753
1754    // One page scrolling effect
1755    var adminbar_height = jQuery('#wpadminbar').outerHeight();
1756    var sticky_height = 0;
1757
1758    if (jQuery('.sticky-header').length) {
1759        sticky_height = 65;
1760    }
1761
1762    jQuery('.t4p-accordian .panel-title.toggle a').click(function (e) {
1763        e.preventDefault();
1764    });
1765
1766    jQuery('[data-toggle=modal]').live('click', function (e) {
1767        e.preventDefault();
1768    });
1769
1770    jQuery('.woocommerce .images #carousel a').click(function (e) {
1771        e.preventDefault();
1772    });
1773
1774
1775
1776    jQuery('.portfolio-tabs a').click(function (e) {
1777        e.preventDefault();
1778
1779        var selector = jQuery(this).attr('data-filter');
1780        jQuery(this).parents('.portfolio').find('.portfolio-wrapper').isotope({filter: selector});
1781
1782        jQuery(this).parents('ul').find('li').removeClass('active');
1783        jQuery(this).parent().addClass('active');
1784    });
1785
1786    jQuery('.faq-tabs a').click(function (e) {
1787        e.preventDefault();
1788
1789        var selector = jQuery(this).attr('data-filter');
1790
1791        jQuery('.faqs .portfolio-wrapper .faq-item').fadeOut();
1792        jQuery('.faqs .portfolio-wrapper .faq-item' + selector).fadeIn();
1793
1794        jQuery(this).parents('ul').find('li').removeClass('active');
1795        jQuery(this).parent().addClass('active');
1796    });
1797
1798
1799    jQuery('.t4p-alert .close').click(function (e) {
1800        e.preventDefault();
1801
1802        jQuery(this).parent().slideUp();
1803    });
1804
1805    jQuery('.content-boxes-icon-boxed').each(function () {
1806        jQuery(this).find('.content-box-column .content-wrapper-boxed').equalHeights();
1807        jQuery(this).find('.content-box-column .content-wrapper-boxed').css('overflow', 'visible');
1808    });
1809
1810});
1811
1812jQuery(document).ready(function ($) {
1813    // Prevent the Blog Timeline from showing huge font size of Date when loading. 
1814    //jQuery('div.timeline-date').removeClass('hidden-div');	  
1815
1816    // Prevent the sidebar from showing when using shortcodes.  
1817    if (jQuery('div.t4p-blog-shortcode').length && jQuery('div.full-width').length) {
1818        jQuery("#secondary").css({"display": "none"});
1819    }
1820
1821    if (jQuery('div.t4p-woo-product-slider').length && jQuery('div.full-width').length) {
1822        jQuery("#secondary").css({"display": "none"});
1823    }
1824
1825    if (jQuery('div.t4p-slider-sc').length && jQuery('div.full-width').length) {
1826        jQuery("#secondary").css({"display": "none"});
1827    }
1828});
1829
1830jQuery(document).ready(function ($) {
1831    // Tabs
1832    //When page loads...
1833    jQuery('.tabs-wrapper').each(function () {
1834        jQuery(this).find(".tab_content").hide(); //Hide all content
1835        if (document.location.hash && jQuery(this).find("ul.tabs li a[href='" + document.location.hash + "']").length >= 1) {
1836            jQuery(this).find("ul.tabs li a[href='" + document.location.hash + "']").parent().addClass("active").show(); //Activate first tab
1837            jQuery(this).find(document.location.hash + ".tab_content").show(); //Show first tab content
1838        } else {
1839            jQuery(this).find("ul.tabs li:first").addClass("active").show(); //Activate first tab
1840            jQuery(this).find(".tab_content:first").show(); //Show first tab content
1841        }
1842    });
1843
1844    jQuery('[data-toggle=modal]').live('click', function (e) {
1845        e.preventDefault();
1846    });
1847
1848    //On Click Event
1849    jQuery("ul.tabs li").click(function (e) {
1850        jQuery(this).parents('.tabs-wrapper').find("ul.tabs li").removeClass("active"); //Remove any "active" class
1851        jQuery(this).addClass("active"); //Add "active" class to selected tab
1852        jQuery(this).parents('.tabs-wrapper').find(".tab_content").hide(); //Hide all tab content
1853
1854        var activeTab = jQuery(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
1855        jQuery(this).parents('.tabs-wrapper').find(activeTab).fadeIn(); //Fade in the active ID content
1856
1857        jQuery(this).parents('.tabs-wrapper').find(activeTab).find('.content-boxes').each(function () {
1858            var cols = jQuery(this).find('.col').length;
1859            jQuery(this).addClass('columns-' + cols);
1860        });
1861
1862        jQuery(this).parents('.tabs-wrapper').find(activeTab).find('.columns-3 .col:nth-child(3n), .columns-4 .col:nth-child(4n)').css('margin-right', '0px');
1863
1864        jQuery(this).parents('.tabs-wrapper').find(activeTab).find('.portfolio-wrapper').isotope('reLayout');
1865
1866        jQuery(this).parents('.tabs-wrapper').find(activeTab).find('.content-boxes-icon-boxed').each(function () {
1867            jQuery(this).find('.col').equalHeights();
1868        });
1869
1870        jQuery(this).parents('.tabs-wrapper').find(activeTab).find('.shortcode-map').each(function () {
1871            jQuery("#" + this.id).goMap();
1872            marker = jQuery.goMap.markers[0];
1873            if (marker) {
1874                info = jQuery.goMap.getInfo(marker);
1875                jQuery.goMap.setInfo(marker, info);
1876            }
1877            var center = jQuery.goMap.getMap().getCenter();
1878            google.maps.event.trigger(jQuery.goMap.getMap(), 'resize');
1879            jQuery.goMap.getMap().setCenter(center);
1880        });
1881
1882        generateCarousel();
1883
1884        if (jQuery('.portfolio').length >= 1) {
1885            jQuery('.portfolio-wrapper').isotope('reLayout');
1886        }
1887
1888        e.preventDefault();
1889    });
1890
1891    jQuery("ul.tabs li a").click(function (e) {
1892        e.preventDefault();
1893    });
1894});
1895
1896//
1897//
1898// 
1899// Responsive Images
1900//
1901//
1902//
1903
1904var $addmenueffect = jQuery.noConflict();
1905$addmenueffect("#primary img").addClass("img-responsive");
1906
1907
1908//
1909//
1910// 
1911// Carousel Slider Arrows
1912//
1913//
1914//
1915
1916var $jx = jQuery.noConflict();
1917$jx(document).ready(function () {
1918    $jx('div#slide_holder').hover(function () {
1919        $jx(this).find('.arrow span').stop(true, true).fadeIn(200).show(10);
1920    }, function () {
1921        $jx(this).find('.arrow span').stop(true, true).fadeOut(200).hide(10);
1922    });
1923});
1924
1925//
1926//
1927// 
1928// Shortcodes
1929//
1930//
1931//   
1932
1933(function ($) {
1934    $.fn.equalHeights = function (minHeight, maxHeight) {
1935        tallest = (minHeight) ? minHeight : 0;
1936        this.each(function () {
1937            $(this).css('height', 'auto');
1938            if ($(this).height() > tallest) {
1939                tallest = $(this).height();
1940            }
1941        });
1942        if ((maxHeight) && tallest > maxHeight)
1943            tallest = maxHeight;
1944        return this.each(function () {
1945            $(this).height(tallest).css("overflow", "auto");
1946        });
1947    }
1948})(jQuery);
1949
1950

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.