PageSourceSearch

https://rollertrol.com/script.js

js rollertrol.com collected 2026-10-04 02:43:11 UTC 53,262 bytes, 1,456 lines download raw bytes

1/* Created by Artisteer v4.3.0.60745 */
2/*jshint forin:true, noarg:true, noempty:true, eqeqeq:true, bitwise:true, strict:true, undef:true, curly:false, browser:true, jquery:false */
3/*global jQuery BackgroundHelper */
4
5// css helper
6browser = function ($) {
7    'use strict';
8    var data = [
9        { str: navigator.userAgent, sub: 'Chrome', ver: 'Chrome', name: 'chrome' },
10        { str: navigator.vendor, sub: 'Apple', ver: 'Version', name: 'safari' },
11        { prop: window.opera, ver: 'Opera', name: 'opera' },
12        { str: navigator.userAgent, sub: 'Firefox', ver: 'Firefox', name: 'firefox' },
13        { str: navigator.userAgent, sub: 'MSIE', ver: 'MSIE', name: 'ie' },
14        { str: navigator.userAgent, sub: 'Trident/7.0', ver: 'rv', name: 'ie' }
15    ];
16    var v = function (s, n) {
17        var i = s.indexOf(data[n].ver);
18        return (i !== -1) ? parseFloat(s.substring(i + data[n].ver.length + 1)) : 0;
19    };
20    var result = { name: 'unknown', version: 0 };
21    var html = $('html');
22    for (var n = 0; n < data.length; n++) {
23        if (!result[data[n].name]) {
24            result[data[n].name] = false;
25        }
26        if ((data[n].str && (data[n].str.indexOf(data[n].sub) !== -1)) || data[n].prop) {
27            result.name = data[n].name;
28            result[result.name] = true;
29            result.version = v(navigator.userAgent, n) || v(navigator.appVersion, n);
30            html.addClass(result.name + ' ' + result.name + parseInt(result.version, 10));
31        }
32    }
33    return result;
34} (jQuery);
35
36jQuery(function ($) {
37    if (typeof responsiveDesign === "undefined") {
38        $("html").addClass("desktop");
39    }
40});
41
42jQuery(function ($) {
43    'use strict';
44    var i, j, k, l, m;
45    if (!browser.ie || browser.version !== 9) {
46        return;
47    }
48    var splitByTokens = function (str, startToken, endToken, last) {
49        if (!last) {
50            last = false;
51        }
52        var startPos = str.indexOf(startToken);
53        if (startPos !== -1) {
54            startPos += startToken.length;
55            var endPos = last ? str.lastIndexOf(endToken) : str.indexOf(endToken, startPos);
56
57            if (endPos !== -1 && endPos > startPos) {
58                return str.substr(startPos, endPos - startPos);
59            }
60        }
61        return '';
62    };
63
64    var splitWithBrackets = function (str, token, brackets) {
65        /*jshint nonstandard:true */
66        if (!token) {
67            token = ',';
68        }
69        if (!brackets) {
70            brackets = '()';
71        }
72        var bracket = 0;
73        var startPos = 0;
74        var result = [];
75        if (brackets.lenght < 2) {
76            return result;
77        }
78        var pos = 0;
79        while (pos < str.length) {
80            var ch = str[pos];
81            if (ch === brackets[0]) {
82                bracket++;
83            }
84            if (ch === brackets[1]) {
85                bracket--;
86            }
87            if (ch === token && bracket < 1) {
88                result.push(str.substr(startPos, pos - startPos));
89                startPos = pos + token.length;
90            }
91            pos++;
92        }
93        result.push(str.substr(startPos, pos - startPos));
94        return result;
95    };
96
97    var byteToHex = function (d) {
98        var hex = Number(d).toString(16);
99        while (hex.length < 2) {
100            hex = "0" + hex;
101        }
102        return hex;
103    };
104
105    for (i = 0; i < document.styleSheets.length; i++) {
106        var s = document.styleSheets[i];
107        var r = [s];
108        for (j = 0; j < s.imports.length; j++) {
109            r.push(s.imports[j]);
110        }
111        for (j = 0; j < r.length; j++) {
112            s = r[j];
113            var n = [];
114            for (k = 0; k < s.rules.length; k++) {
115                var css = s.rules[k].cssText || s.rules[k].style.cssText;
116                if (!css) {
117                    continue;
118                }
119                var value = splitByTokens(css, '-svg-background:', ';');
120                if (value === '') {
121                    continue;
122                }
123                var values = splitWithBrackets(value);
124                for (l = 0; l < values.length; l++) {
125                    var g = splitByTokens(values[l], 'linear-gradient(', ')', true);
126                    if (g === '') {
127                        continue;
128                    }
129                    var args = splitWithBrackets(g);
130                    if (args.length < 3) {
131                        continue;
132                    }
133                    var maxOffset = 0;
134                    var stops = [];
135                    for (m = 1; m < args.length; m++) {
136                        var stopValues = splitWithBrackets($.trim(args[m]), ' ');
137                        if (stopValues.length < 2) {
138                            continue;
139                        }
140                        var stopColor = $.trim(stopValues[0]);
141                        var stopOpacity = 1;
142                        if (stopColor == 'transparent') {
143                            stopColor = '#000000';
144                            stopOpacity = 0;
145                        }
146                        var colorRgba = splitByTokens(stopColor, 'rgba(', ')', true);
147                        var stopOffset = $.trim(stopValues[1]);
148                        if (colorRgba !== "") {
149                            var rgba = colorRgba.split(',');
150                            if (rgba.length < 4) {
151                                continue;
152                            }
153                            stopColor = '#' + byteToHex(rgba[0]) + byteToHex(rgba[1]) + byteToHex(rgba[2]);
154                            stopOpacity = rgba[3];
155                        }
156                        var isPx = stopOffset.indexOf('px') !== -1;
157                        if (isPx) {
158                            maxOffset = Math.max(maxOffset, parseInt(stopOffset, 10) || 0);
159                        }
160                        stops.push({ offset: stopOffset, color: stopColor, opacity: stopOpacity, isPx: isPx });
161                    }
162                    var stopsXML = '';
163                    var lastStop = null;
164                    for (m = 0; m < stops.length; m++) {
165                        if (stops[m].isPx) {
166                            stops[m].offset = ((parseInt(stops[m].offset, 10) || 0) / (maxOffset / 100)) + '%';
167                        }
168                        stopsXML += '<stop offset="' + stops[m].offset + '" stop-color="' + stops[m].color + '" stop-opacity="' + stops[m].opacity + '"/>';
169                        if (m === stops.length - 1) {
170                            lastStop = stops[m];
171                        }
172                    }
173                    var isLeft = $.trim(args[0]) === 'left';
174                    var direction = 'x1="0%" y1="0%" ' + (isLeft ? 'x2="100%" y2="0%"' : 'x2="0%" y2="
174100%"');
175                    var gradientLength = '100%';
176                    if (maxOffset > 0) {
177                        gradientLength = maxOffset + 'px';
178                    }
179                    var size = (isLeft ? 'width="' + gradientLength + '" height="100%"' : 'width="100%" height="' + gradientLength + '"');
180                    var last = "";
181                    if (lastStop !== null && maxOffset > 0) {
182                        last = '<rect ' +
183                            (isLeft ?
184                                'x="' + maxOffset + '" y="0"' :
185                                'x="0" y="' + maxOffset + '"') +
186                            ' width="100%" height="100%" style="fill:' + lastStop.color + ';opacity:' + lastStop.opacity + ';"/>';
187
188                    }
189                    var svgGradient = '<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none"><linearGradient id="g" gradientUnits="objectBoundingBox" ' + direction + '>' + stopsXML + '</linearGradient><rect x="0" y="0" ' + size + ' fill="url(#g)" />' + last + '</svg>';
190                    values[l] = values[l].replace('linear-gradient(' + g + ')', 'url(data:image/svg+xml,' + escape(svgGradient) + ')');
191                }
192                n.push({ s: s.rules[k].selectorText, v: 'background: ' + values.join(",") });
193            }
194            for (k = 0; k < n.length; k++) {
195                s.addRule(n[k].s, n[k].v);
196            }
197        }
198    }
199});
200
201
202jQuery(function ($) {
203    "use strict";
204    // ie8
205    if (!browser.ie || browser.version > 8) return;
206    $('.art-shapes').each(function () {
207        if ($(this).siblings('.art-slider').length) {
208            $(this).remove();
209        } else {
210            $(this).css('z-index', 1);
211        }
212    });
213
214    // ie7
215    if (!browser.ie || browser.version > 7) return;
216    var textblockTexts = $('.art-textblock div[class$="-text"]');
217    textblockTexts.each(function () {
218        var tbText = $(this);
219        var valign = tbText.css('vertical-align') ? tbText.css('vertical-align') : 'top';
220        if (valign === 'middle') {
221            var wrapper = tbText.wrap('<div/>').parent();
222            tbText.css({
223                'position': 'relative',
224                'top': '-50%',
225                'height': 'auto'
226            });
227            wrapper.css({
228                'position': 'absolute',
229                'top': '50%'
230            });
231        } else if (valign === 'bottom') {
232            tbText.css({
233                'position': 'absolute',
234                'height': 'auto',
235                'bottom': 0
236            });
237        }
238    });
239});
240
241/* Set wmode=transparent for youtube and other video hostings to show it under the menus, lightboxes etc. */
242jQuery(function ($) {
243    "use strict";
244    var video = ["youtube"];
245
246    $("iframe[src]").each(function () {
247        var iframe = $(this),
248            src = iframe.attr("src"),
249            isVideo = false,
250            i;
251
252        for (i = 0; i < video.length; i++) {
253            if (src.toLowerCase().indexOf(video[i].toLowerCase()) !== -1) {
254                isVideo = true;
255                break;
256            }
257        }
258
259        if (!isVideo) {
260            return;
261        }
262
263        if (src.lastIndexOf("?") !== -1) {
264            src += "&amp;wmode=transparent";
265        } else {
266            src += "?wmode=transparent";
267        }
268        iframe.attr("src", src);
269    });
270});
271
272jQuery(function ($) {
273    "use strict";
274    $(window).bind("resize", function () { navigatorResizeHandler($("html").hasClass("responsive")); });
275});
276
277var navigatorResizeHandler = (function ($) {
278    "use strict";
279    return function (responsiveDesign) {
280        if (responsiveDesign) return;
281        $(".art-slider").each(function () {
282            var slider = $(this);
283            var sliderWidth = slider.width();
284            var nav = slider.siblings(".art-slidenavigator");
285            var navWidth = nav.outerWidth();
286            if (nav.length && navWidth < sliderWidth) {
287                // left offset
288                var left = nav.attr("data-left");
289                // (margin = containerWidth - (objectPosition + objectWidth)) < 0
290                var margin = sliderWidth - sliderWidth * parseFloat(left) / 100 - nav.outerWidth(false);
291                if (margin < 0) {
292                    nav.css("margin-left", margin);
293                }
294            }
295        });
296    };
297})(jQuery);
298
299var processElementMultiplyBg = (function ($) {
300    return (function (selector, info) {
301        if (!selector || !info || !info.bgimage || !info.bgposition || !info.images || !info.positions) return;
302        var path = "";
303        var script = $('head script[src*="script.js"]');
304        if (script.length) {
305            path = (script.attr('src') || '');
306            path = path.substr(0, path.lastIndexOf('/') + 1);
307        }
308        var html = '';
309        var el = $(selector);
310        var bgimages = info.images.split(",");
311        var bgpositions = info.positions.split(",");
312        for (var i = bgimages.length - 1; i >= 0; i--) {
313            var bgimage = $.trim(bgimages[i]);
314            if (bgimage === "")
315                continue;
316            var imgIdx = bgimage.lastIndexOf('images/');
317            var className = bgimage.substring(imgIdx + 7, bgimage.length - 6);
318            el.append("<div class=\"ie8fix " + className + "\" style=\"position:absolute;top:0;left:0;width:100%;height:100%;background:" + bgimage.replace(/(images\/[^\/]+)$/, path + '$1') + " " + bgpositions[i] + " no-repeat\"></div>");
319        }
320        el.css('background-image', info.bgimage.replace(/(images\/[^\/]+)$/, path + '$1'));
321        el.css('background-position-x', "50%");
322        el.css('background-position-y', "50%");
323    });
324})(jQuery);
325
326
327var responsiveNavigator = (function ($) {
328    "use strict";
329    return function () {
330        if (typeof headerObjectResizer !== 'undefined' && headerObjectResizer.isPreview) return;
331
332        var sheet = $('.art-sheet');
333        var sheetWidth = sheet.outerWidth();
334
335        $(".art-slider").each(function () {
336            var currentSlider = $(this);
337            var currentSliderWidth = currentSlider.width();
338
339            var sliderNavigator = currentSlider.siblings(".art-slidenavigator");
340            if (sliderNavigator.length) {
341                var off = sheetLeftFunc(sheet, sliderNavigator);
342                var calcWidth = isContentSlider(sliderNavigator) ? currentSliderWidth : sheetWidth;
343
344                var navigatorWidth = sliderNavigator.outerWidth();
345                var offset = parseInt(sliderNavigator.attr('data-offset') || 0, 10);
346
347                // left offset
348                sliderNavigator.css('margin-left', '0px');
349
350                var left = parseFloat(sliderNavigator.attr("data-left"), 10);
351                var newLeft = off + uniToPx(left, navigatorWidth, calcWidth);
352                sliderNavigator.css('left', newLeft + 'px');
353
354
355                // reset top to original value
356                sliderNavigator.css("top", "");
357
358                // top
359                var navigatorHeight = sliderNavigator.outerHeight();
360                var uniy = parseFloat(sliderNavigator.attr('data-top'), 10);
361
362                var sliderHeight = parseInt(currentSlider.css('height'), 10);
363                var newTop = uniToPx(uniy, navigatorHeight, sliderHeight);
364
365                sliderNavigator.css("top", (newTop + offset) + 'px');
366            }
367        });
368    };
369})(jQuery);
370
371jQuery(function ($) {
372    "use strict";
373
374    if (typeof responsiveDesign === "undefined") {
375        $(window).bind("resize", responsiveNavigator);
376    }
377
378    $(window).on("load", function pageInitialize() {
379        $(window).trigger("resize");
380        $(window).off("load", pageInitialize);
381    });
382});
383
384
385/* Icons in Header should have display block.
386 * Otherwise, in case of inline-block there's a space gap in some browsers (Opera 12.16) and icon is cutted.
387 */
388if (browser.opera) {
389    jQuery(function ($) {
390        $(".art-header a[class$='tag-icon']").css("display", "block");
391    });
392}
393
394jQuery(function($) {
395    "use strict";
396     $(window).bind("resize", function () {
397        /*global responsiveDesign */
398        "use strict";
399        if (typeof responsiveDesign !== "undefined" && responsiveDesign.isResponsive)
400            return;
401        var sheetLeft = $(".art-sheet").offset().left;
402        $("header.art-header #art-flash-area").each(function () {
403            var object = $(this);
404            object.css("left", sheetLeft + "px");
405        });
406    });
407});
408
409jQuery(function($) {
410    "use strict";
411    $('nav.art-nav').addClass("desktop-nav");
412});
413
414
415jQuery(function ($) {
416    "use strict";
417    if (!browser.ie || browser.version > 7) {
418        return;
419    }
420    $('ul.art-hmenu>li:not(:first-child)').each(function () { $(this).prepend('<span class="art-hmenu-separator"> </span>'); });
421});
422
423jQuery(function ($) {
424    "use strict";
425    $("ul.art-hmenu a:not([href])").attr('href', '#').click(function (e) { e.preventDefault(); });
426});
427
428
429jQuery(function ($) {
430    "use strict";
431    if (!browser.ie || browser.version > 7) {
432        return;
433    }
434
435    /* Fix width of submenu items.
436    * The width of submenu item calculated incorrectly in IE6-7. IE6 has wider items, IE7 display items like stairs.
437    */
438    $.each($("ul.art-hmenu ul"), function () {
439        var maxSubitemWidth = 0;
440        var submenu = $(this);
441        var subitem = null;
442        $.each(submenu.children("li").children("a"), function () {
443            subitem = $(this);
444            var subitemWidth = subitem.outerWidth(false);
445            if (maxSubitemWidth < subitemWidth) {
446                maxSubitemWidth = subitemWidth;
447            }
448        });
449        if (subitem !== null) {
450            var subitemBorderLeft = parseInt(subitem.css("border-left-width"), 10) || 0;
451            var subitemBorderRight = parseInt(subitem.css("border-right-width"), 10) || 0;
452            var subitemPaddingLeft = parseInt(subitem.css("padding-left"), 10) || 0;
453            var subitemPaddingRight = parseInt(subitem.css("padding-right"), 10) || 0;
454            maxSubitemWidth -= subitemBorderLeft + subitemBorderRight + subitemPaddingLeft + subitemPaddingRight;
455            submenu.children("li").children("a").css("width", maxSubitemWidth + "px");
456        }
457    });
458});
459
460jQuery(function ($) {
461    "use strict";
462    var setDirection = function() {
463        setHMenuOpenDirection({
464            container: "div.art-sheet",
465            defaultContainer: "#art-main",
466            menuClass: "art-hmenu",
467            leftToRightClass: "art-hmenu-left-to-right",
468            rightToLeftClass: "art-hmenu-right-to-left"
469        });
470    };
471    if (typeof responsiveDesign !== "undefined") {
472        $(window).on('responsive', setDirection);
473    } else {
474        setDirection();
475    }
476});
477
478var setHMenuOpenDirection = (function ($) {
479    "use strict";
480    return (function(menuInfo) {
481        var defaultContainer = $(menuInfo.defaultContainer);
482        defaultContainer = defaultContainer.length > 0 ? defaultContainer = $(defaultContainer[0]) : null;
483
484        $("ul." + menuInfo.menuClass + ">li>ul").each(function () {
485            var submenu = $(this);
486
487            var submenuWidth = submenu.outerWidth(false);
488            var submenuLeft = submenu.offset().left;
489
490            var mainContainer = submenu.parents(menuInfo.container);
491            mainContainer = mainContainer.length > 0 ? mainContainer = $(mainContainer[0]) : null;
492
493            var container = mainContainer || defaultContainer;
494            if (container !== null) {
495                var containerLeft = container.offset().left;
496                var containerWidth = container.outerWidth(false);
497
498                if (submenuLeft + submenuWidth >= containerLeft + containerWidth) {
499                    /* right to left */
500                    submenu.addClass(menuInfo.rightToLeftClass).find("ul").addClass(menuInfo.rightToLeftClass);
501                } else if (submenuLeft <= containerLeft) {
502                    /* left to right */
503                    submenu.addClass(menuInfo.leftToRightClass).find("ul").addClass(menuInfo.leftToRightClass);
504                }
505            }
506        });
507    });
508})(jQuery);
509
510jQuery(function ($) {
511    $("ul.art-hmenu ul li").hover(function () { $(this).prev().children("a").addClass("art-hmenu-before-hovered"); }, 
512        function () { $(this).prev().children("a").removeClass("art-hmenu-before-hovered"); });
513});
514
515jQuery(function ($) {
516    'use strict';
517
518    if (browser.ie && browser.version < 8) {
519        $(window).bind('resize', function() {
520            var c = $('div.art-content');
521            var s = c.parent().children('.art-layout-cell:not(.art-content)');
522            var w = 0;
523            c.hide();
524            s.each(function() { w += $(this).outerWidth(true); });
525            c.w = c.parent().width(); c.css('width', c.w - w + 'px');
526            c.show();
527        });
528    }
529
530    $(window).trigger('resize');
531});
532
533var artButtonSetup = (function ($) {
534    'use strict';
535    return (function (className) {
536        $.each($("a." + className + ", button." + className + ", input." + className), function (i, val) {
537            var b = $(val);
538            if (!b.hasClass('art-button')) {
539                b.addClass('art-button');
540            }
541            if (b.is('input')) {
542                b.val(b.val().replace(/^\s*/, '')).css('zoom', '1');
543            }
544            b.mousedown(function () {
545                var b = $(this);
546                b.addClass("active");
547            });
548            b.mouseup(function () {
549                var b = $(this);
550                if (b.hasClass('active')) {
551                    b.removeClass('active');
552                }
553            });
554            b.mouseleave(function () {
555                var b = $(this);
556                if (b.hasClass('active')) {
557                    b.removeClass('active');
558                }
559            });
560        });
561    });
562})(jQuery);
563jQuery(function () {
564    'use strict';
565    artButtonSetup("art-button");
566});
567
568var Control = (function ($) {
569    'use strict';
570    return (function () {
571        this.init = function(label, type, callback) {
572            var chAttr = label.find('input[type="' +type + '"]').attr('checked');
573            if (chAttr === 'checked') {
574              label.addClass('art-checked');
575            }
576
577            label.mouseleave(function () {
578              $(this).removeClass('hovered').removeClass('active');
579            });
580            label.mouseover(function () {
581              $(this).addClass('hovered').removeClass('active');
582            });
583            label.mousedown(function (event) {
584              if (event.which !== 1) {
585                  return;
586              }
587              $(this).addClass('active').removeClass('hovered');
588            });
589            label.mouseup(function (event) {
590              if (event.which !== 1) {
591                  return;
592              }
593              callback.apply(this);
594              $(this).removeClass('active').addClass('hovered');
595            });
596        };
597    });
598})(jQuery);
599
600
601jQuery(function ($) {
602    'use strict';
603    $('.art-pager').contents().filter(
604        function () {
605            return this.nodeType === this.TEXT_NODE;
606        }
607    ).remove();
608});
609var fixRssIconLineHeight = (function ($) {
610    "use strict";
611    return function (className) {
612        $("." + className).css("line-height", $("." + className).height() + "px");
613    };
614})(jQuery);
615
616jQuery(function ($) {
617    "use strict";
618    var rssIcons = $(".art-rss-tag-icon");
619    if (rssIcons.length){
620        fixRssIconLineHeight("art-rss-tag-icon");
621        if (browser.ie && browser.version < 9) {
622            rssIcons.each(function () {
623                if ($.trim($(this).html()) === "") {
624                    $(this).css("vertical-align", "middle");
625                }
626            });
627        }
628    }
629});
630var ThemeLightbox = (function ($) {
631    'use strict';
632    return (function () {
633        var images = $(".art-lightbox");
634        var current;
635        this.init = function (ctrl) {
636            $(".art-lightbox").mouseup({ _ctrl: ctrl }, function (e) {
637                if ((e.data._ctrl === true && !e.ctrlKey) || (e.which && e.which !== 1)) {
638                    return;
639                }
640
641                images = $(".art-lightbox");
642
643                current = images.index(this);
644
645                var imgContainer = $('.art-lightbox-wrapper');
646                if (imgContainer.length === 0) {
647                    imgContainer = $('<div class="art-lightbox-wrapper">').css('line-height', $(window).height() + "px")
648                    .appendTo($("body"));
649
650                    var closeBtn = $('<div class="close"><div class="cw"> </div><div class="ccw"> </div><div class="close-alt">&#10007;</div></div>')
651                .click(close);
652                    closeBtn.appendTo(imgContainer);
653                    showArrows();
654                }
655
656                move(current);
657            });
658        };
659
660        function move(index) {
661            if (index < 0 || index >= images.length) {
662                return;
663            }
664
665            showError(false);
666
667            current = index;
668
669            $(".art-lightbox-wrapper .art-lightbox-image:not(.active)").remove();
670
671            var active = $(".art-lightbox-wrapper .active");
672            var target = $('<img class="art-lightbox-image" alt="" src="' + getFullImgSrc($(images[current]).attr("src")) + '" />').click(function () {
673                if ($(this).hasClass("active")) {
674                    move(current + 1);
675                }
676            });
677
678            if (active.length > 0) {
679                active.after(target);
680            } else {
681                $(".art-lightbox-wrapper").append(target);
682            }
683
684            showArrows();
685            showLoader(true);
686
687            bindMouse($(".art-lightbox-wrapper").add(target));
688
689            target.load(function () {
690                showLoader(false);
691
692                active.removeClass("active");
693                target.addClass("active");
694            });
695
696            target.error(function () {
697                showLoader(false);
698                active.removeClass("active");
699                target.addClass("active");
700                target.attr("src", $(images[current]).attr("src"));
701            });
702        }
703
704        function showArrows() {
705            if ($(".art-lightbox-wrapper .arrow").length === 0) {
706                $(".art-lightbox-wrapper").append(
707                    $('<div class="arrow left"><div class="arrow-t ccw"> </div><div class="arrow-b cw"> </div><div class="arrow-left-alt">&#8592;</div></div>')
708                        .css("top", $(window).height() / 2 - 40)
709                        .click(function () {
710                            if (!$(this).hasClass("disabled")) {
711                                move(current - 1);
712                            }
713                        })
714                );
715                $(".art-lightbox-wrapper").append(
716                    $('<div class="arrow right"><div class="arrow-t cw"> </div><div class="arrow-b ccw"> </div><div class="arrow-right-alt">&#8594;</div></div>')
717                        .css("top", $(window).height() / 2 - 40)
718                        .click(function () {
719                            if (!$(this).hasClass("disabled")) {
720                                move(current + 1);
721                            }
722                        })
723                );
724            }
725
726            if (current === 0) {
727                $(".art-lightbox-wrapper .arrow.left").addClass("disabled");
728            } else {
729                $(".art-lightbox-wrapper .arrow.left").removeClass("disabled");
730            }
731
732            if (current === images.length - 1) {
733                $(".art-lightbox-wrapper .arrow.right").addClass("disabled");
734            } else {
735                $(".art-lightbox-wrapper .arrow.right").removeClass("disabled");
736            }
737        }
738
739        function showError(enable) {
740            if (enable) {
741                $(".art-lightbox-wrapper").append($('<div class="lightbox-error">The requested content cannot be loaded.<br/>Please try again later.</div>')
742                        .css({ "top": $(window).height() / 2 - 60, "left": $(window).width() / 2 - 170 }));
743            } else {
744                $(".art-lightbox-wrapper .lightbox-error").remove();
745            }
746        }
747
748        function showLoader(enable) {
749            if (!enable) {
750                $(".art-lightbox-wrapper .loading").remove();
751            }
752            else {
753                $('<div class="loading"> </div>').css({ "top": $(window).height() / 2 - 16, "left": $(window).width() / 2 - 16 }).appendTo($(".art-lightbox-wrapper"));
754            }
755        }
756
757        var close = function () {
758            $(".art-lightbox-wrapper").remove();
759        };
760
761        function bindMouse(img) {
762            img.bind('mousewheel DOMMouseScroll', function (e) {
763                var orgEvent = window.event || e.originalEvent;
764                var delta = (orgEvent.wheelDelta ? orgEvent.wheelDelta : orgEvent.detail * -1) > 0 ? 1 : -1;
765                move(current + delta);
766                e.preventDefault();
767            }).mousedown(function (e) {
768                // close on middle button click
769                if (e.which === 2) {
770                    close();
771                }
772                e.preventDefault();
773            });
774        }
775
776        function getFullImgSrc(src) {
777            var fileName = src.substring(0, src.lastIndexOf('.'));
778            var ext = src.substring(src.lastIndexOf('.'));
779            return fileName + "-large" + ext;
780        }
781
782    });
783})(jQuery);
784
785jQuery(function () {
786    'use strict';
787    new ThemeLightbox().init();
788});
789
790(function ($) {
791    'use strict';
792    // transition && transitionEnd && browser prefix
793    $.support.themeTransition = (function () {
794        var thisBody = document.body || document.documentElement,
795            thisStyle = thisBody.style,
796            support = thisStyle.transition !== undefined ||
797                thisStyle.WebkitTransition !== undefined ||
798                thisStyle.MozTransition !== undefined ||
799                thisStyle.MsTransition !== undefined ||
800                thisStyle.OTransition !== undefined;
801        return support && {
802            event: (function () {
803                return "transitionend webkitTransitionEnd otransitionend oTransitionEnd";
804            })(),
805            prefix: (function () {
806                return ({
807                    opera: "-o-",
808                    firefox: "-moz-",
809                    chrome: "-webkit-",
810                    safari: "-webkit-",
811                    ie: ""
812                }[browser.name] || "");
813            })()
814        };
815    })();
816
817    window.BackgroundHelper = function () {
818        var slides = [];
819        var direction = "next";
820        var motion = "horizontal";
821        var width = 0;
822        var height = 0;
823        var multiplier = 1;
824        var originalWidth = 0;
825        var originalHeight = 0;
826        var transitionDuration = "";
827
828        this.init = function (motionType, dir, duration) {
829            direction = dir;
830            motion = motionType;
831            slides = [];
832            width = 0;
833            height = 0;
834            multiplier = 1;
835            originalWidth = 0;
836            originalHeight = 0;
837            transitionDuration = duration;
838        };
839
840        this.processSlide = function (element, modify) {
841            this.updateSize(element, null);
842            var pos = [];
843
844            var bgPosition = element.css("background-position");
845            var positions = bgPosition.split(",");
846            $.each(positions, function (i) {
847                var position = $.trim(this);
848                var point = position.split(" ");
849                var zeroValue = browser.ie && browser.version >= 10 ? 0.1 : 0;
850                if (point.length > 1) {
851                    var x = point[0].indexOf('%') === -1 ? parseFloat(point[0], 10) : zeroValue;
852                    var y = point[1].indexOf('%') === -1 ? parseFloat(point[1], 10) : zeroValue;
853                    pos.push({ x: x, y: y });
854                } else {
855                    pos.push({ x: zeroValue, y: zeroValue });
856                }
857            });
858
859            slides.push({
860                "images": element.css("background-image"),
861                "sizes": element.css("background-size"),
862                "positions": pos
863            });
864
865            if (modify)
866                element.css("background-image", "none");
867        };
868
869        this.updateSize = function (element, initialSize) {
870            width = element.outerWidth(false);
871            height = element.outerHeight();
872            if (initialSize && parseInt(initialSize.width, 10) !== 0) {
873                originalWidth = parseInt(initialSize.width, 10);
874                originalHeight = parseInt(initialSize.height, 10);
875                if (motion === "fade") {
876                    $.each(element.children(), function (i) {
877                        $(this).css("background-position", getCssPositions(slides[i].positions, { x: 0, y: 0 }));
878                    });
879                }
880            }
881        };
882
883        this.setBackground = function (element, items) {
884            var bg = [];
885            var sizes = [];
886            $.each(items, function (i, o) {
887                bg.push(o.images);
888                sizes.push(o.sizes);
889            });
890            element.css({
891                "background-image": bg.join(", "),
892                //"background-size": sizes.join(", "),
893                "background-repeat": "no-repeat"
894            });
895        };
896
897        this.setPosition = function (element, items) {
898            var pos = [];
899            $.each(items, function (i, o) {
900                pos.push(o.positions);
901            });
902            element.css({
903                "background-position": pos.join(", ")
904            });
905        };
906
907        this.current = function (index) {
908            return slides[index] || null;
909        };
910
911        this.next = function (index) {
912            var next;
913            if (direction === "next") {
914                next = (index + 1) % slides.length;
915            } else {
916                next = index - 1;
917                if (next < 0) {
918                    next = slides.length - 1;
919                }
920            }
921            return slides[next];
922        };
923
924        this.items = function (prev, next, move) {
925            var prevItem = { x: 0, y: 0 };
926            var nextItem = { x: 0, y: 0 };
927            var isDirectionNext = direction === "next";
928            var verticalOffset = -(originalHeight - height) / 2;
929            var horizontalOffset = -(originalWidth - width) / 2;
930            if (motion === "horizontal") {
931                prevItem.y = nextItem.y = -(originalHeight - height) / 2;
932                prevItem.x = horizontalOffset;
933                nextItem.x = (isDirectionNext ? originalWidth : -originalWidth) + horizontalOffset;
934                if (move) {
935                    prevItem.x += isDirectionNext ? -originalWidth : originalWidth;
936                    nextItem.x += isDirectionNext ? -originalWidth : originalWidth;
937                }
938            } else if (motion === "vertical") {
939                prevItem.x = nextItem.x = horizontalOffset;
940                prevItem.y = verticalOffset;
941                nextItem.y = (isDirectionNext ? originalHeight : -originalHeight) + verticalOffset;
942                if (move) {
943                    prevItem.y += isDirectionNext ? -originalHeight : originalHeight;
944                    nextItem.y += isDirectionNext ? -originalHeight : originalHeight;
945                }
946            }
947            var result = [];
948            if (!!prev) {
949                result.push({ images: prev.images, positions: getCssPositions(prev.positions, prevItem), sizes: prev.sizes });
950            }
951            if (!!next) {
952                result.push({ images: next.images, positions: getCssPositions(next.positions, nextItem), sizes: next.sizes });
953            }
954
955            if (direction === "next") {
956                result.reverse();
957            }
958
959            return result;
960        };
961
962        this.transition = function (container, on) {
963            container.css($.support.themeTransition.prefix + "transition", on ? "background-position " + transitionDuration + " ease-in-out" : "");
964        };
965
966        function getCssPositions(positions, offset) {
967            var result = [];
968            if (positions === undefined) {
969                return "";
970            }
971            offset.x = offset.x || 0;
972            offset.y = offset.y || 0;
973            for (var i = 0; i < positions.length; i++) {
974                result.push((positions[i].x * 1 + offset.x) + "px " + (positions[i].y * 1 + offset.y) + "px");
975            }
976            return result.join(", ");
977        }
978    };
979
980
981    var ThemeSlider = function (element, settings) {
982
983        var interval = null;
984        var active = false;
985        var children = element.find(".active").parent().children();
986        var last = false;
987        var running = false;
988
989        this.settings = $.extend({}, {
990            "animation": "horizontal",
991            "direction": "next",
992            "speed": 600,
993            "pause": 2500,
994            "auto": true,
995            "repeat": true,
996            "navigator": null,
997            "clickevents": true,
998            "hover": true,
999            "helper": null
1000        }, settings);
1001
1002        this.move = function (direction, next) {
1003            var activeItem = element.find(".active"),
1004                nextItem = next || activeItem[direction](),
1005                innerDirection = this.settings.direction === "next" ? "forward" : "back",
1006                reset = direction === "next" ? "first" : "last",
1007                moving = interval,
1008                slider = this, tmp;
1009
1010            active = true;
1011
1012            if (moving) { this.stop(true); }
1013
1014            if (!nextItem.length) {
1015                nextItem = element.find(".art-slide-item")[reset]();
1016                if (!this.settings.repeat) { last = true; active = false; return; }
1017            }
1018
1019            if ($.support.themeTransition) {
1020                nextItem.addClass(this.settings.direction);
1021                tmp = nextItem.get(0).offsetHeight;
1022
1023                activeItem.addClass(innerDirection);
1024                nextItem.addClass(innerDirection);
1025
1026                element.trigger("beforeSlide", children.length);
1027
1028                element.one($.support.themeTransition.event, function () {
1029                    nextItem.removeClass(slider.settings.direction)
1030                        .removeClass(innerDirection)
1031                        .addClass("active");
1032                    activeItem.removeClass("active")
1033                        .removeClass(innerDirection);
1034                    active = false;
1035                    setTimeout(function () {
1036                        element.trigger("afterSlide", children.length);
1037                    }, 0);
1038                });
1039            } else {
1040                element.trigger("beforeSlide", children.length);
1041
1042                activeItem.removeClass("active");
1043                nextItem.addClass("active");
1044                active = false;
1045
1046                element.trigger("afterSlide", children.length);
1047            }
1048
1049            this.navigate(nextItem);
1050
1051            if (moving) { this.start(); }
1052        };
1053
1054        this.navigate = function (position) {
1055            var index = children.index(position);
1056            $(this.settings.navigator).children().removeClass("active").eq(index).addClass("active");
1057        };
1058
1059        this.to = function (index) {
1060            var activeItem = element.find(".active"),
1061                children = activeItem.parent().children(),
1062                activeIndex = children.index(activeItem),
1063                slider = this;
1064
1065            if (index > (children.length - 1) || index < 0) {
1066                return;
1067            }
1068
1069            if (active) {
1070                return element.one("afterSlide", function () {
1071                    slider.to(index);
1072                });
1073            }
1074
1075            if (activeIndex === index) {
1076                return;
1077            }
1078
1079            this.move(index > activeIndex ? "next" : "prev", $(children[index]));
1080        };
1081
1082        this.next = function () {
1083            if (!active) {
1084                if (last) { this.stop(); return; }
1085                this.move("next");
1086            }
1087        };
1088
1089        this.prev = function () {
1090            if (!active) {
1091                if (last) { this.stop(); return; }
1092                this.move("prev");
1093            }
1094        };
1095
1096        this.start = function (force) {
1097            if (!!force) {
1098                setTimeout($.proxy(this.next, this), 10);
1099            }
1100            interval = setInterval($.proxy(this.next, this), this.settings.pause);
1101            running = true;
1102        };
1103
1104        this.stop = function (pause) {
1105            clearInterval(interval);
1106            interval = null;
1107            running = !!pause;
1108            active = false;
1109        };
1110
1111        this.active = function () {
1112            return running;
1113        };
1114
1115        this.moving = function () {
1116            return active;
1117        };
1118
1119        this.navigate(children.filter(".active"));
1120
1121        if (this.settings.clickevents) {
1122            $(this.settings.navigator).on("click", "a", { slider: this }, function (event) {
1123                var activeIndex = children.index(children.filter(".active"));
1124                var index = $(this).parent().children().index($(this));
1125                if (activeIndex !== index) {
1126                    event.data.slider.to(index);
1127                }
1128                event.preventDefault();
1129            });
1130        }
1131
1132        if (this.settings.hover) {
1133            var slider = this;
1134            element.add(this.settings.navigator)
1135                   .add(element.siblings(".art-shapes")).hover(function () {
1136                       if (element.is(":visible") && !last) { slider.stop(true); }
1137                   }, function () {
1138                       if (element.is(":visible") && !last) { slider.start(); }
1139                   });
1140        }
1141    };
1142
1143    $.fn.themeSlider = function (arg) {
1144        return this.each(function () {
1145            var element = $(this),
1146                data = element.data("slider"),
1147                options = typeof arg === "object" && arg;
1148
1149            if (!data) {
1150                data = new ThemeSlider(element, options);
1151                element.data("slider", data);
1152            }
1153
1154            if (typeof arg === "string" && data[arg]) {
1155                data[arg]();
1156            } else if (data.settings.auto && element.is(":visible")) {
1157                data.start();
1158            }
1159        });
1160    };
1161
1162})(jQuery);
1163
1164
1165
1166
1167if (typeof window.resizeData === 'undefined') window.resizeData = {};
1168window.resizeData.headerPageWidth = false;
1169if (typeof window.defaultResponsiveData === 'undefined') window.defaultResponsiveData = [false, true, true, true, true, ];
1170
1171resizeData['headline'] = {
1172   responsive: [
1173                  { left: 0.02, top: 0.59, visible: true }, 
1174                  { left: 0.02, top: 0.59, visible: true }, 
1175                  { left: 0.02, top: 0.59, visible: true }, 
1176                  { left: 0.02, top: 0.59, visible: true }, 
1177                  { left: 0.02, top: 0.59, visible: true }, 
1178               ],
1179   area: {
1180       x: 0,
1181       y: 0
1182   },
1183   width: 234,
1184   height: 43,
1185   autoWidth: true};
1186
1187resizeData['slogan'] = {
1188   responsive: [
1189                  { left: 0.02, top: 0.81, visible: true }, 
1190                  { left: 0.02, top: 0.81, visible: true }, 
1191                  { left: 0.02, top: 0.81, visible: true }, 
1192                  { left: 0.02, top: 0.81, visible: true }, 
1193                  { left: 0.02, top: 0.81, visible: true }, 
1194               ],
1195   area: {
1196       x: 0,
1197       y: 0
1198   },
1199   width: 232,
1200   height: 20,
1201   autoWidth: true};
1202
1203// used to apply compicated values in style like '!important!
1204function applyCss(object, param, value) {
1205    var rg = new RegExp(param + '\s*:\s*[^;]+;', "i");
1206    var style = object.attr('style');
1207    var str = param + ': ' + value + ';';
1208    if (rg.test(style)) {
1209        style = style.replace(rg, str);
1210    }
1211    else {
1212        style += '; ' + str;
1213    }
1214
1215    object.attr('style', style);
1216}
1217
1218// convert universal coord to pixels
1219function uniToPx(uni, size, parentSize) {
1220    uni = parseFloat(uni || '0');
1221    if (uni < 0) {
1222        uni = uni * size;
1223    } else if (uni >= 1) {
1224        uni = parentSize - (2 - uni) * size;
1225    } else {
1226        uni = uni * (parentSize - size);
1227    }
1228
1229    return uni;
1230}
1231
1232function isContentSlider(object) {
1233    var isHeader = object.parents('header').length > 0;
1234    if (isHeader) {
1235        return false;
1236    }
1237    var isPageSlider = object.parents('.art-pageslider').length > 0;
1238    if (isPageSlider)
1239        return false;
1240
1241    return true;
1242}
1243
1244function sheetLeftFunc(sheet, object) {
1245    var sheetLeft = sheet.offset().left;
1246
1247    var isHeader = object.parents('header').length > 0;
1248    if (isHeader) {
1249        if (resizeData.headerPageWidth) return sheetLeft;
1250    } else {
1251        var isPageSlider = object.parents('.art-pageslider').length > 0;
1252        if (isPageSlider) {
1253            if (resizeData.pageSliderPageWidth) return sheetLeft;
1254        }
1255    }
1256
1257    return 0;
1258}
1259
1260var headerObjectResizer = {
1261    
1262    postInit: false,
1263
1264    resize: (function ($) {
1265        'use strict';
1266        return function () {
1267            if (!headerObjectResizer.postInit && typeof responsiveDesign !== 'undefined') {
1268                $(window).on('responsiveResize', headerObjectResizer.resize);
1269                headerObjectResizer.postInit = true;
1270            }
1271
1272            var responsiveType = 0;
1273            // if we don't use full custom responsive so we MUST cleanup all styles
1274            var cleanUpStyles = false;
1275            // when use default respo so while in desktop mode always use 0-type, in other case cleanup our styles
1276            if (typeof responsiveDesign !== 'undefined' && 
1277                    defaultResponsiveData[responsiveDesign.responsiveTypeIdx] &&
1278                    responsiveDesign.isResponsive) {
1279                cleanUpStyles = true;
1280            }
1281
1282            if (typeof responsiveDesign !== 'undefined') {
1283                if (responsiveDesign.responsiveType === 'tabletlandscape') {
1284                    responsiveType = 1;
1285                } else if (responsiveDesign.responsiveType === 'tabletportrait') {
1286                    responsiveType = 2;
1287                } else if (responsiveDesign.responsiveType === 'phonelandscape') {
1288                    responsiveType = 3;
1289                } else if (responsiveDesign.responsiveType === 'phoneportrait') {
1290                    responsiveType = 4;
1291                }
1292            }
1293
1294            var sheet = $('.art-sheet');
1295            var sheetWidth = sheet.outerWidth();
1296
1297            var header = $('header');
1298            var height = 0;
1299            var cssPrefix = 'art-';
1300
1301            // move html shapes
1302            var headerQuery = 'header.art-header .art-shapes>
1302*, header.art-header .art-textblock, header.art-header>.art-headline, header.art-header>.art-slogan, header.art-header>.art-positioncontrol, header.art-header>.art-logo';
1303            var pageSliderQuery = '.art-pageslider .art-slide-item>*';
1304            if (headerObjectResizer.isPreview) {
1305                headerQuery = 'header .art-slider';
1306                pageSliderQuery = '.art-pageslider .art-slider, .art-pageslider .art-textblock';
1307            }
1308            $(headerQuery + ', ' + pageSliderQuery).each(function () {
1309                var object = $(this);
1310                height = object.parent().height();
1311
1312                var off = sheetLeftFunc(sheet, object);
1313
1314                var cls = object.attr('class').split(' ');
1315                $.each(cls, function (key, val) {
1316                    val = $.trim(val);
1317                    if (val.length === 0) return;
1318                    if (val.indexOf(cssPrefix) !== 0) return;
1319
1320                    val = val.substring(cssPrefix.length);
1321                    var data = resizeData[val];
1322                    if (typeof data === 'undefined') return;
1323
1324                    if (cleanUpStyles) {
1325                        object.css('display', '');
1326                        object.css('left', '');
1327                        object.css('margin-left', '');
1328                    }
1329
1330                    var respData = data.responsive[responsiveType];
1331                    if (respData.visible) {
1332                        object.css('display', '');
1333                    } else {
1334                        applyCss(object, 'display', 'none !important');
1335                    }
1336
1337                    if (cleanUpStyles || !respData.visible) return false;
1338
1339                    var x = uniToPx(respData.left, data.autoWidth ? object.width() : data.width, sheetWidth);
1340                    x += off;
1341
1342                    var y = uniToPx(respData.top, data.height, height);
1343
1344                    object.css('left', x + 'px');
1345                    object.css('top', y + 'px');
1346                    applyCss(object, 'margin-left', '0px !important');
1347                    return false;
1348                });
1349            });
1350
1351            // move images in slide's background-images
1352            var slides = $('.art-slide-item').add(header);
1353            if (browser.ie && browser.version <= 8) {
1354                slides = slides.add('.art-slide-item .ie8fix');
1355            }
1356            $.each(slides, function (slideIdx, slide) {
1357                slide = $(slide);
1358
1359                if (slide.closest('.art-collage').length > 0 || cleanUpStyles) {
1360                    slide.css('background-position', '');
1361                    return;
1362                }
1363
1364                var slideVisible = slide.is(':visible');
1365                if (!slideVisible && browser.ie) {
1366                    slide.css('display', 'block');
1367                }
1368
1369                var off = sheetLeftFunc(sheet, slide);
1370
1371                if (browser.ie && browser.version <= 8) {
1372                    var s = slide.attr('style');
1373                    if (s) {
1374                        s = s.replace(/background\-position[^;]+/, '');
1375                        slide.attr('style', s);
1376                    }
1377                } else {
1378                    slide.css('background-position', '');
1379                }
1380                slide.css('background-size', '');
1381
1382                var bgImage = slide.css('background-image') ? slide.css('background-image').split(',') : [];
1383                var bgPosition = slide.css('background-position') && (slide.css('background-position').replace(/[0][^\d]+/gi, '')).length > 0 ?
1384                    slide.css('background-position').split(',') :
1385                    [];
1386                if (bgImage.length !== bgPosition.length) {
1387                    slide.css('display', '');
1388                    return;
1389                }
1390
1391                height = slide.height();
1392                if (height === 0) height = slide.parent().height();
1393
1394                $.each(bgImage, function (idx, val) {
1395                    var findImageIdx = val.lastIndexOf('images/');
1396                    var findDotIdx = val.lastIndexOf('.');
1397                    if (findImageIdx === -1 || findDotIdx === -1) return;
1398
1399                    var name = val.substring(findImageIdx + 7, findDotIdx);
1400
1401                    var data = resizeData[name];
1402                    if (typeof data === 'undefined') return;
1403
1404                    var respData = data.responsive[responsiveType];
1405                    // big default coordinates for hiding
1406                    var x = 9999, y = 9999;
1407                    if (respData.visible) {
1408                        x = uniToPx(respData.left, data.width, sheetWidth);
1409                        x += off + data.area.x;
1410
1411                        y = uniToPx(respData.top, data.height, height);
1412                        y += data.area.y;
1413                    }
1414
1415                    bgPosition[idx] = x + 'px ' + y + 'px';
1416                });
1417
1418                slide.css('background-position', bgPosition.join(','));
1419
1420                if (!slideVisible && browser.ie) {
1421                    slide.css('display', '');
1422                }
1423            });
1424
1425        };
1426    })(jQuery),
1427
1428    initialize: function ($) {
1429        if (!browser.ie || browser.version > 8) {
1430            $(window).on('resize', this.resize);
1431        } else {
1432            var resizeTimeout;
1433            var self = this;
1434            $(window).on("resize", function () {
1435                clearTimeout(resizeTimeout);
1436                resizeTimeout = setTimeout(function () { self.resize(); }, 25);
1437            });
1438        }
1439    }
1440};
1441
1442headerObjectResizer.initialize(jQuery);
1443jQuery(function ($) {
1444    "use strict";
1445    if (!browser.ie || browser.version > 8)
1446        return;
1447    processElementMultiplyBg(".art-header", {
1448        "bgimage": "url('images/header.jpg')",
1449        "bgposition": "0 0",
1450        "images": "",
1451        "positions": ""
1452    });
1453});
1454if (typeof window.resizeData === 'undefined') window.resizeData = {};
1455
1456window.resizeData.pageSliderPageWidth = false;

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.