PageSourceSearch

http://remoknastroy.ru/wp-content/themes/okna_templates/script.js?ver=4.9.21

js remoknastroy.ru collected 2026-10-07 13:20:28 UTC 39,376 bytes, 1,135 lines download raw bytes

1/* Created by Artisteer v4.0.0.58475 */
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 */
4
5// css helper
6(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    ];
15    var v = function (s, n) {
16        var i = s.indexOf(data[n].ver);
17        return (i !== -1) ? parseInt(s.substring(i + data[n].ver.length + 1), 10) : '';
18    };
19    var html = $('html');
20    for (var n = 0; n < data.length; n++) {
21        if ((data[n].str && (data[n].str.indexOf(data[n].sub) !== -1)) || data[n].prop) {
22            html.addClass(data[n].name + ' ' + data[n].name + v(navigator.userAgent, n) || v(navigator.appVersion, n));
23            break;
24        }
25    }
26
27    // 'desktop' class is used as responsive design initial value
28    html.addClass('desktop');
29})(jQuery);
30
31jQuery(function ($) {
32    'use strict';
33    var i, j, k, l, m;
34    if (!$.browser.msie || parseInt($.browser.version, 10) !== 9) {
35        return;
36    }
37
38    var splitByTokens = function (str, startToken, endToken, last) {
39        if (!last) {
40            last = false;
41        }
42        var startPos = str.indexOf(startToken);
43        if (startPos !== -1) {
44            startPos += startToken.length;
45            var endPos = last ? str.lastIndexOf(endToken) : str.indexOf(endToken, startPos);
46
47            if (endPos !== -1 && endPos > startPos) {
48                return str.substr(startPos, endPos - startPos);
49            }
50        }
51        return '';
52    };
53
54    var splitWithBrackets = function (str, token, brackets) {
55        /*jshint nonstandard:true */
56        if (!token) {
57            token = ',';
58        }
59        if (!brackets) {
60            brackets = '()';
61        }
62        var bracket = 0;
63        var startPos = 0;
64        var result = [];
65        if (brackets.lenght < 2) {
66            return result;
67        }
68        var pos = 0;
69        while (pos < str.length) {
70            var ch = str[pos];
71            if (ch === brackets[0]) {
72                bracket++;
73            }
74            if (ch === brackets[1]) {
75                bracket--;
76            }
77            if (ch === token && bracket < 1) {
78                result.push(str.substr(startPos, pos - startPos));
79                startPos = pos + token.length;
80            }
81            pos++;
82        }
83        result.push(str.substr(startPos, pos - startPos));
84        return result;
85    };
86
87    var byteToHex = function (d) {
88        var hex = Number(d).toString(16);
89        while (hex.length < 2) {
90            hex = "0" + hex;
91        }
92        return hex;
93    };
94
95    for (i = 0; i < document.styleSheets.length; i++) {
96        var s = document.styleSheets[i];
97        var r = [s];
98        for (j = 0; j < s.imports.length; j++) {
99            r.push(s.imports[j]);
100        }
101        for (j = 0; j < r.length; j++) {
102            s = r[j];
103            var n = [];
104            for (k = 0; k < s.rules.length; k++) {
105                var css = s.rules[k].cssText || s.rules[k].style.cssText;
106                if (!css) {
107                    continue;
108                }
109                var value = splitByTokens(css, '-svg-background:', ';');
110                if (value === '') {
111                    continue;
112                }
113                var values = splitWithBrackets(value);
114                for (l = 0; l < values.length; l++) {
115                    var g = splitByTokens(values[l], 'linear-gradient(', ')', true);
116                    if (g === '') {
117                        continue;
118                    }
119                    var args = splitWithBrackets(g);
120                    if (args.length < 3) {
121                        continue;
122                    }
123                    var maxOffset = 0;
124                    var stops = [];
125                    for (m = 1; m < args.length; m++) {
126                        var stopValues = splitWithBrackets(args[m].trim(), ' ');
127                        if (stopValues.length < 2) {
128                            continue;
129                        }
130                        var stopColor = stopValues[0].trim();
131                        var stopOpacity = 1;
132                        var colorRgba = splitByTokens(stopColor, 'rgba(', ')', true);
133                        var stopOffset = stopValues[1].trim();
134                        if (colorRgba !== "") {
135                            var rgba = colorRgba.split(',');
136                            if (rgba.length < 4) {
137                                continue;
138                            }
139                            stopColor = '#' + byteToHex(rgba[0]) + byteToHex(rgba[1]) + byteToHex(rgba[2]);
140                            stopOpacity = rgba[3];
141                        }
142                        var isPx = stopOffset.indexOf('px') !== -1;
143                        if (isPx) {
144                            maxOffset = Math.max(maxOffset, parseInt(stopOffset, 10) || 0);
145                        }
146                        stops.push({ offset: stopOffset, color: stopColor, opacity: stopOpacity, isPx: isPx });
147                    }
148                    var stopsXML = '';
149                    var lastStop = null;
150                    for (m = 0; m < stops.length; m++) {
151                        if (stops[m].isPx) {
152                            stops[m].offset = ((parseInt(stops[m].offset, 10) || 0) / (maxOffset / 100)) + '%';
153                        }
154                        stopsXML += '<stop offset="' + stops[m].offset + '" stop-color="' + stops[m].color + '" stop-opacity="' + stops[m].opacity + '"/>';
155                        if (m === stops.length - 1) {
156                            lastStop = stops[m];
157                        }
158                    }
159                    var isLeft = args[0].trim() === 'left';
160                    var direction = 'x1="0%" y1="0%" ' + (isLeft ? 'x2="100%" y2="0%"' : 'x2="0%" y2="
160100%"');
161                    var gradientLength = '100%';
162                    if (maxOffset > 0) {
163                        gradientLength = maxOffset + 'px';
164                    }
165                    var size = (isLeft ? 'width="' + gradientLength + '" height="100%"' : 'width="100%" height="' + gradientLength + '"');
166                    var last = "";
167                    if (lastStop !== null && maxOffset > 0) {
168                        last = '<rect ' +
169                            (isLeft ?
170                                'x="' + maxOffset + '" y="0"' :
171                                'x="0" y="' + maxOffset + '"') +
172                            ' width="100%" height="100%" style="fill:' + lastStop.color + ';opacity:' + lastStop.opacity + ';"/>';
173
174                    }
175                    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>';
176                    values[l] = values[l].replace('linear-gradient(' + g + ')', 'url(data:image/svg+xml,' + escape(svgGradient) + ')');
177                }
178                n.push({ s: s.rules[k].selectorText, v: 'background: ' + values.join(",") });
179            }
180            for (k = 0; k < n.length; k++) {
181                s.addRule(n[k].s, n[k].v);
182            }
183        }
184    }
185});
186
187jQuery(function ($) {
188    'use strict';
189    // ie < 9 slider multiple background fix
190    if (!jQuery.browser.msie || jQuery.browser.version > 8) return;
191    
192    function split(str) {
193        str = str.replace(/"/g, '').replace(/%20/g, '');
194        return  str.split(/\s*,\s*/);
195    }
196
197    $('.art-slider .art-slide-item').each(function () {
198        var bgs = split($(this).css('background-image'));
199        // needs to use the last image
200        if (bgs.length > 1) {
201            $(this).css("background-image", bgs[bgs.length - 1]);
202        }
203    });
204});
205jQuery(function($) {
206    'use strict';
207    $('nav.art-nav').addClass("desktop-nav");
208});
209
210
211jQuery(function ($) {
212    'use strict';
213    if (!$.browser.msie || parseInt($.browser.version, 10) > 7) {
214        return;
215    }
216    $('ul.art-hmenu>li:not(:first-child)').each(function () { $(this).prepend('<span class="art-hmenu-separator"> </span>'); });
217});
218
219jQuery(function ($) {
220    'use strict';
221    $("ul.art-hmenu a:not([href])").attr('href', '#').click(function (e) { e.preventDefault(); });
222});
223
224
225jQuery(function ($) {
226    'use strict';
227    if (!$.browser.msie) {
228        return;
229    }
230    var ieVersion = parseInt($.browser.version, 10);
231    if (ieVersion > 7) {
232        return;
233    }
234
235    /* Fix width of submenu items.
236    * The width of submenu item calculated incorrectly in IE6-7. IE6 has wider items, IE7 display items like stairs.
237    */
238    $.each($("ul.art-hmenu ul"), function () {
239        var maxSubitemWidth = 0;
240        var submenu = $(this);
241        var subitem = null;
242        $.each(submenu.children("li").children("a"), function () {
243            subitem = $(this);
244            var subitemWidth = subitem.outerWidth();
245            if (maxSubitemWidth < subitemWidth) {
246                maxSubitemWidth = subitemWidth;
247            }
248        });
249        if (subitem !== null) {
250            var subitemBorderLeft = parseInt(subitem.css("border-left-width"), 10) || 0;
251            var subitemBorderRight = parseInt(subitem.css("border-right-width"), 10) || 0;
252            var subitemPaddingLeft = parseInt(subitem.css("padding-left"), 10) || 0;
253            var subitemPaddingRight = parseInt(subitem.css("padding-right"), 10) || 0;
254            maxSubitemWidth -= subitemBorderLeft + subitemBorderRight + subitemPaddingLeft + subitemPaddingRight;
255            submenu.children("li").children("a").css("width", maxSubitemWidth + "px");
256        }
257    });
258});
259jQuery(function () {
260    'use strict';
261    setHMenuOpenDirection({
262        container: "div.art-sheet",
263        defaultContainer: "#art-main",
264        menuClass: "art-hmenu",
265        leftToRightClass: "art-hmenu-left-to-right",
266        rightToLeftClass: "art-hmenu-right-to-left"
267    });
268});
269
270var setHMenuOpenDirection = (function($) {
271    'use strict';
272    return (function(menuInfo) {
273        var defaultContainer = $(menuInfo.defaultContainer);
274        defaultContainer = defaultContainer.length > 0 ? defaultContainer = $(defaultContainer[0]) : null;
275
276        $("ul." + menuInfo.menuClass + ">li>ul").each(function () {
277            var submenu = $(this);
278
279            var submenuWidth = submenu.outerWidth();
280            var submenuLeft = submenu.offset().left;
281
282            var mainContainer = submenu.parents(menuInfo.container);
283            mainContainer = mainContainer.length > 0 ? mainContainer = $(mainContainer[0]) : null;
284
285            var container = mainContainer || defaultContainer;
286            if (container !== null) {
287                var containerLeft = container.offset().left;
288                var containerWidth = container.outerWidth();
289
290                if (submenuLeft + submenuWidth >= containerLeft + containerWidth) {
291                    /* right to left */
292                    submenu.addClass(menuInfo.rightToLeftClass).find("ul").addClass(menuInfo.rightToLeftClass);
293                } else if (submenuLeft <= containerLeft) {
294                    /* left to right */
295                    submenu.addClass(menuInfo.leftToRightClass).find("ul").addClass(menuInfo.leftToRightClass);
296                }
297            }
298        });
299    });
300})(jQuery);
301
302
303jQuery(window).bind("resize", function () {
304    /*global responsiveDesign */
305    'use strict';
306    if (typeof responsiveDesign !== "undefined" && responsiveDesign.isResponsive)
307        return;
308    var sheetLeft = jQuery(".art-sheet").offset().left;
309    jQuery("header.art-header #art-flash-area").each(function () {
310        var object = jQuery(this);
311        object.css("left", sheetLeft + "px");
312    });
313});
314
315jQuery(function ($) {
316    'use strict';
317    jQuery(window).bind('resize', function () {
318        var bh = jQuery('body').height();
319        var mh = 0;
320        var c = jQuery('div.art-content');
321        c.removeAttr('style');
322
323        jQuery('#art-main').children().each(function() {
324            if (jQuery(this).css('position') !== 'absolute') {
325                mh += jQuery(this).outerHeight(true);
326            }
327        });
328        
329        if (mh < bh) {
330            var r = bh - mh;
331            c.css('height', (c.outerHeight(true) + r) + 'px');
332        }
333    });
334
335    if ($.browser.msie && parseInt($.browser.version, 10) < 8) {
336        $(window).bind('resize', function() {
337            var c = $('div.art-content');
338            var s = c.parent().children('.art-layout-cell:not(.art-content)');
339            var w = 0;
340            c.hide();
341            s.each(function() { w += $(this).outerWidth(true); });
342            c.w = c.parent().width(); c.css('width', c.w - w + 'px');
343            c.show();
344        });
345    }
346
347    $(window).trigger('resize');
348});
349
350var artButtonSetup = (function ($) {
351    'use strict';
352    return (function (className) {
353        $.each($("a." + className + ", button." + className + ", input." + className), function (i, val) {
354            var b = $(val);
355            if (!b.hasClass('art-button')) {
356                b.addClass('art-button');
357            }
358            if (b.is('input')) {
359                b.val(b.val().replace(/^\s*/, '')).css('zoom', '1');
360            }
361            b.mousedown(function () {
362                var b = $(this);
363                b.addClass("active");
364            });
365            b.mouseup(function () {
366                var b = $(this);
367                if (b.hasClass('active')) {
368                    b.removeClass('active');
369                }
370            });
371            b.mouseleave(function () {
372                var b = $(this);
373                if (b.hasClass('active')) {
374                    b.removeClass('active');
375                }
376            });
377        });
378    });
379})(jQuery);
380jQuery(function () {
381    'use strict';
382    artButtonSetup("art-button");
383});
384
385var Control = (function ($) {
386    'use strict';
387    return (function () {
388        this.init = function(label, type, callback) {
389            var chAttr = label.find('input[type="' +type + '"]').attr('checked');
390            if (chAttr === 'checked') {
391              label.addClass('art-checked');
392            }
393
394            label.mouseleave(function () {
395              $(this).removeClass('hovered').removeClass('active');
396            });
397            label.mouseover(function () {
398              $(this).addClass('hovered').removeClass('active');
399            });
400            label.mousedown(function (event) {
401              if (event.which !== 1) {
402                  return;
403              }
404              $(this).addClass('active').removeClass('hovered');
405            });
406            label.mouseup(function (event) {
407              if (event.which !== 1) {
408                  return;
409              }
410              callback.apply(this);
411              $(this).removeClass('active').addClass('hovered');
412            });
413        };
414    });
415})(jQuery);
416
417
418jQuery(function($) {
419    'use strict';
420    if (!$('html').hasClass('ie7')) {
421        return;
422    }
423    $('ul.art-vmenu li:not(:first-child),ul.art-vmenu li li li:first-child,ul.art-vmenu>li>ul').each(function () { $(this).append('<div class="art-vmenu-separator"> </div><div class="art-vmenu-separator-bg"> </div>'); });
424});
425
426
427
428var fixRssIconLineHeight = (function (className) {
429    'use strict';
430    jQuery("." + className).css("line-height", jQuery("." + className).height() + "px");
431});
432
433jQuery(function ($) {
434    'use strict';
435    var rssIcons = $(".art-rss-tag-icon");
436    if (rssIcons.length){
437        fixRssIconLineHeight("art-rss-tag-icon");
438        if ($.browser.msie && parseInt($.browser.version, 10) < 9) {
439            rssIcons.each(function () {
440                if ($.trim($(this).html()) === "") {
441                    $(this).css("vertical-align", "middle");
442                }
443            });
444        }
445    }
446});
447/**
448* @license 
449* jQuery Tools 1.2.6 Mousewheel
450* 
451* NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.
452* 
453* http://flowplayer.org/tools/toolbox/mousewheel.html
454* 
455* based on jquery.event.wheel.js ~ rev 1 ~ 
456* Copyright (c) 2008, Three Dub Media
457* http://threedubmedia.com 
458*
459* Since: Mar 2010
460* Date:  
461*/
462(function ($) {
463    'use strict';
464    $.fn.mousewheel = function (fn) {
465        return this[fn ? "bind" : "trigger"]("wheel", fn);
466    };
467
468    // special event config
469    $.event.special.wheel = {
470        setup: function () {
471            $.event.add(this, wheelEvents, wheelHandler, {});
472        },
473        teardown: function () {
474            $.event.remove(this, wheelEvents, wheelHandler);
475        }
476    };
477
478    // events to bind ( browser sniffed... )
479    var wheelEvents = !$.browser.mozilla ? "mousewheel" : // IE, opera, safari
480        "DOMMouseScroll" + ($.browser.version < "1.9" ? " mousemove" : ""); // firefox
481
482    // shared event handler
483    function wheelHandler(event) {
484        /*jshint validthis:true*/
485        
486        switch (event.type) {
487
488            // FF2 has incorrect event positions
489            case "mousemove":
490                return $.extend(event.data, { // store the correct properties
491                    clientX: event.clientX, clientY: event.clientY,
492                    pageX: event.pageX, pageY: event.pageY
493                });
494
495                // firefox
496            case "DOMMouseScroll":
497                $.extend(event, event.data); // fix event properties in FF2
498                event.delta = -event.detail / 3; // normalize delta
499                break;
500
501            // IE, opera, safari
502            case "mousewheel":
503                event.delta = event.wheelDelta / 120;
504                break;
505        }
506
507        event.type = "wheel"; // hijack the event
508        return $.event.handle.call(this, event, event.delta);
509    }
510
511})(jQuery);
512
513
514var ThemeLightbox = (function ($) {
515    'use strict';
516    return (function () {
517        var current;
518        var images = $("img.art-lightbox");
519
520        var b = $("body");
521
522        this.init = function (ctrl) {
523            $("img.art-lightbox").live("click", { _ctrl: ctrl }, function (e) {
524
525                if (e.data._ctrl === true && !e.ctrlKey) {
526                    return;
527                }
528
529                reload();
530                current = images.index(this);
531                show(this);
532            });
533
534            $(".arrow.left:not(.disabled)").live("click", function () {
535                move(current - 1);
536            });
537
538            $(".arrow.right:not(.disabled)").live("click", function () {
539                move(current + 1);
540            });
541
542            $("img.active").live("click", function () {
543                move(current + 1);
544            });
545
546            $(".close").live("click", function () {
547                close();
548            });
549        };
550
551        function show(src) {
552            var d = $('<div id="art-lightbox-bg"><div class="close"><div class="cw"> </div><div class="ccw"> </div><div class="close-alt">&#10007;</div></div></div>');
553
554            var img = $('<img class="art-lightbox-image active" alt="" src="' + getFullImgSrc($(src).attr("src")) + '" />');
555
556            resizeOnLoad(img);
557            img.appendTo(b);
558            showArrows();
559
560            showLoader(true);
561
562            img.load(function () {
563                showLoader(false);
564                d.appendTo(b).height(Math.max(document.documentElement.scrollHeight, document.body.scrollHeight));
565            });
566
567            img.error(function () {
568                showLoader(false);
569                d.appendTo(b).height(Math.max(document.documentElement.scrollHeight, document.body.scrollHeight));
570
571                //showError(true);
572                img.attr("src", $(src).attr("src"));
573            });
574            d.click(close);
575            bindMouse($(".arrow").add(img).add(d));
576        }
577
578        function reload() {
579            images = $("img.art-lightbox");
580        }
581
582        function move(index) {
583            if (index < 0 || index >= images.length) {
584                return;
585            }
586
587            showError(false);
588
589            current = index;
590
591            $("img.art-lightbox-image:not(.active)").remove();
592
593            var active = $("img.active");
594
595            var target = $('<img class="art-lightbox-image" alt="" src="' + getFullImgSrc($(images[current]).attr("src")) + '" />');
596
597            resizeOnLoad(target);
598            active.after(target);
599
600            showArrows();
601            showLoader(true);
602
603            bindMouse($("#art-lightbox-bg").add(target));
604
605            target.load(function () {
606                showLoader(false);
607
608                active.removeClass("active");
609                target.addClass("active");
610            });
611
612            target.error(function () {
613                showLoader(false);
614
615                //showError(true);
616                active.removeClass("active");
617                target.addClass("active");
618                target.attr("src", $(images[current]).attr("src"));
619            });
620        }
621
622        function showArrows() {
623            if ($(".arrow").length === 0) {
624                b.append($('<div class="arrow left"><div class="arrow-t ccw"> </div><div class="arrow-b cw"> </div><div class="arrow-left-alt">&#8592;</div></div>').css("top", $(window).height() / 2 - 40));
625
626                b.append($('<div class="arrow right"><div class="arrow-t cw"> </div><div class="arrow-b ccw"> </div><div class="arrow-right-alt">&#8594;</div></div>').css("top", $(window).height() / 2 - 40));
627            }
628
629            if (current === 0) {
630                $(".arrow.left").addClass("disabled");
631            } else {
632                $(".arrow.left").removeClass("disabled");
633            }
634
635            if (current === images.length - 1) {
636                $(".arrow.right").addClass("disabled");
637            } else {
638                $(".arrow.right").removeClass("disabled");
639            }
640        }
641
642        function showError(enable) {
643            if (enable) {
644                b.append($('<div class="lightbox-error">Данный контент невозможно загрузить.<br/>Пожалуйста, повторите попытку позже.</div>')
645                        .css({ "top": $(window).height() / 2 - 60, "left": $(window).width() / 2 - 170 }));
646    
646        } else {
647                $(".lightbox-error").remove();
648            }
649        }
650
651        function showLoader(enable) {
652            if (!enable) {
653                $(".loading").remove();
654            }
655            else {
656                $('<div class="loading"> </div>').css({ "top": $(window).height() / 2 - 16, "left": $(window).width() / 2 - 16 }).appendTo(b);
657            }
658        }
659
660        var close = function () {
661            $("#art-lightbox-bg, .art-lightbox-image, .arrow, .lightbox-error").remove();
662        };
663
664        function resizeOnLoad(img) {
665            var width = $(window).width();
666            var height = $(window).height();
667
668            img.load(function () {
669                var imgHeight = $(this).height();
670                var imgWidth = $(this).width();
671
672                // additional space is needed for the next|prev items and border around the images
673                if (height < (imgHeight + 10) || width < (imgWidth + 410)) {
674                    var hScale = Math.abs(imgWidth / (width - 410));
675                    var vScale = Math.abs(imgHeight / (height - 100));
676
677                    var scale = Math.max(vScale, hScale);
678
679                    imgWidth = imgWidth / scale;
680                    imgHeight = imgHeight / scale;
681
682                    img.width(imgWidth);
683                    img.height(imgHeight);
684                }
685
686                img.css({ "top": (height / 2 - imgHeight / 2) - 5, "left": (width / 2 - imgWidth / 2 - 5) });
687            });
688
689            return img;
690        }
691
692        function bindMouse(img) {
693            img.unbind("wheel").mousewheel(function (event, delta) {
694                delta = delta > 0 ? 1 : -1;
695                move(current + delta);
696                event.preventDefault();
697            });
698
699            img.mousedown(function (e) {
700                // close on middle button click
701                if (e.which === 2) {
702                    close();
703                }
704                e.preventDefault();
705            });
706        }
707
708        function getFullImgSrc(src) {
709            var webArchiveRegex = new RegExp("http://www.[A-z0-9-]+-image.com/.webarchive/");
710            if ((src.indexOf("http://") === 0 || src.indexOf("https://") === 0) && !webArchiveRegex.test(src)) {
711                return src;
712            }
713
714            var fileName = src.substring(0, src.lastIndexOf('.'));
715            var ext = src.substring(src.lastIndexOf('.'));
716            src = fileName + "-large" + ext;
717
718            return src;
719        }
720
721    });
722})(jQuery);
723jQuery(function () {
724    'use strict';
725    new ThemeLightbox().init();
726});
727(function($) {
728    'use strict';
729    // transition && transitionEnd && browser prefix
730    $.support.transition = (function() {
731        var thisBody = document.body || document.documentElement,
732            thisStyle = thisBody.style,
733            support = thisStyle.transition !== undefined ||
734                thisStyle.WebkitTransition !== undefined ||
735                thisStyle.MozTransition !== undefined ||
736                thisStyle.MsTransition !== undefined ||
737                thisStyle.OTransition !== undefined;
738        return support && {
739            event: (function() {
740                var e = "transitionend";
741                if ($.browser.opera) {
742                    var version = parseFloat($.browser.version);
743                    e = version >= 12 ? (version < 12.50 ? "otransitionend" : "transitionend") : "oTransitionEnd";
744                } else if ($.browser.webkit) {
745                    e = "webkitTransitionEnd";
746                }
747                return e;
748            })(),
749            prefix: (function() {
750                var result;
751                $.each($.browser, function(key, value) {
752                    if (key === "version") {
753                        return true;
754                    }
755                    return (result = {
756                        opera: "-o-",
757                        mozilla: "-moz-",
758                        webkit: "-webkit-",
759                        msie: "-ms-"
760                    }[key]) ? false : true;
761                });
762                return result || "";
763            })()
764        };
765    })();
766
767    window.BackgroundHelper = function () {
768        var slides = [];
769        var direction = "next";
770        var motion = "horizontal";
771        var width = 0;
772        var height = 0;
773        var transitionDuration = "";
774
775        this.init = function(motionType, dir, duration) {
776            direction = dir;
777            motion = motionType;
778            slides = [];
779            width = 0;
780            height = 0;
781            transitionDuration = duration;
782        };
783
784        this.processSlide = function(element) {
785            width = element.outerWidth();
786            height = element.outerHeight();
787            var pos = [];
788
789            var bgPosition = element.css("background-position");
790            var positions = bgPosition.split(",");
791            $.each(positions, function (i) {
792                var position = $.trim(this);
793                var point = position.split(" ");
794                if (point.length > 1) {
795                    var x = parseInt(point[0], 10);
796                    var y = parseInt(point[1], 10);
797                    pos.push({ x: x, y: y });
798                }
799            });
800
801            slides.push({
802                "images": element.css("background-image"),
803                "positions": pos
804            });
805            element.css("background-image", "none");
806        };
807
808        this.setBackground = function(element, items) {
809            var bg = [];
810            $.each(items, function (i, o) {
811                bg.push(o.images);
812            });
813            element.css({
814                "background-image": bg.join(", "),
815                "background-repeat": "no-repeat"
816            });
817        };
818
819        this.setPosition = function(element, items) {
820            var pos = [];
821            $.each(items, function(i, o) {
822                pos.push(o.positions);
823            });
824            element.css({
825                "background-position": pos.join(", ")
826            });
827        };
828
829        this.current = function(index) {
830            return slides[index] || null;
831        };
832
833        this.next = function(index) {
834            var next;
835            if (direction === "next") {
836                next = (index + 1) % slides.length;
837            } else {
838                next = index - 1;
839                if (next < 0) {
840                    next = slides.length - 1;
841                }
842            }
843            return slides[next];
844        };
845
846        this.items = function(prev, next, move) {
847            var prevItem = { x: 0, y: 0 };
848            var nextItem = { x: 0, y: 0 };
849            var isDirectionNext = direction === "next";
850            if (motion === "horizontal") {
851                nextItem.x = isDirectionNext ? width : -width;
852                nextItem.y = 0;
853                if (move) {
854                    prevItem.x += isDirectionNext ? -width : width;
855                    nextItem.x += isDirectionNext ? -width : width;
856                }
857            } else if (motion === "vertical") {
858                nextItem.x = 0;
859                nextItem.y = isDirectionNext ? height : -height;
860                if (move) {
861                    prevItem.y += isDirectionNext ? -height : height;
862                    nextItem.y += isDirectionNext ? -height : height;
863                }
864            }
865            var result = [ ];
866            if (!!prev) {
867                result.push({ images: prev.images, positions: getCssPositions(prev.positions, prevItem) });
868            }
869            if (!!next) {
870                result.push({ images: next.images, positions: getCssPositions(next.positions, nextItem) });
871            }
872            
873            if (direction === "next") {
874                result.reverse();
875            }
876
877            return result;
878        };
879
880        this.transition = function(container, on) {
881            container.css($.support.transition.prefix + "transition", on ? transitionDuration + " ease-in-out background-position" : "");
882        };
883        
884        function getCssPositions(positions, offset) {
885            var result = [];
886            if (positions === undefined) {
887                return "";
888            }
889            offset.x = offset.x || 0;
890            offset.y = offset.y || 0;
891            for (var i = 0; i < positions.length; i++) {
892                result.push((positions[i].x + offset.x) + "px " + (positions[i].y + offset.y) + "px");
893            }
894            return result.join(", ");
895        }
896    };
897
898
899    var Slider = function (element, settings) {
900
901        var interval = null;
902        var active = false;
903        var children = element.find(".active").parent().children();
904        var last = false;
905        var running = false;
906
907        this.settings = $.extend({ }, {
908            "animation": "horizontal",
909            "direction": "next",
910            "speed": 600,
911            "pause": 2500,
912            "auto": true,
913            "repeat": true,
914            "navigator": null,
915            "clickevents": true,
916            "hover": true,
917            "helper": null
918        }, settings);
919
920        this.move = function (direction, next) {
921            var activeItem = element.find(".active"),
922                nextItem = next || activeItem[direction](),
923                innerDirection = this.settings.direction === "next" ? "forward" : "back",
924                reset = direction === "next" ? "first" : "last",
925                moving = interval,
926                slider = this, tmp;
927
928            active = true;
929
930            if (moving) { this.stop(true); }
931
932            if (!nextItem.length) {
933                nextItem = element.find(".art-slide-item")[reset]();
934                if (!this.settings.repeat) { last = true; active = false; return; }
935            }
936
937            if ($.support.transition) {
938                nextItem.addClass(this.settings.direction);
939                tmp = nextItem.get(0).offsetHeight;
940                
941                activeItem.addClass(innerDirection);
942                nextItem.addClass(innerDirection);
943                
944                element.trigger("beforeSlide", children.length);
945                
946                element.one($.support.transition.event, function () {
947                    nextItem.removeClass(slider.settings.direction)
948                        .removeClass(innerDirection)
949                        .addClass("active");
950                    activeItem.removeClass("active")
951                        .removeClass(innerDirection);
952                    active = false;
953                    setTimeout(function () {
954                        element.trigger("afterSlide", children.length);
955                    }, 0);
956                });
957            } else {
958                element.trigger("beforeSlide", children.length);
959                
960                activeItem.removeClass("active");
961                nextItem.addClass("active");
962                active = false;
963                
964                element.trigger("afterSlide", children.length);
965            }
966
967            this.navigate(nextItem);
968
969            if (moving) { this.start(); }
970        };
971
972        this.navigate = function (position) {
973            var index = children.index(position);
974            $(this.settings.navigator).children().removeClass("active").eq(index).addClass("active");
975        };
976
977        this.to = function (index) {
978            var activeItem = element.find(".active"),
979                children = activeItem.parent().children(),
980                activeIndex = children.index(activeItem),
981                slider = this;
982
983            if (index > (children.length - 1) || index < 0) {
984                return;
985            }
986
987            if (active) {
988                return element.one("afterSlide", function () {
989                    slider.to(index);
990                });
991            }
992            
993            if (activeIndex === index) {
994                return;
995            }
996
997            this.move(index > activeIndex ? "next" : "prev", $(children[index]));
998        };
999
1000        this.next = function () {
1001            if (!active) {
1002                if (last) { this.stop(); return;  }
1003                this.move("next");
1004            }
1005        };
1006
1007        this.prev = function () {
1008            if (!active) {
1009                if (last) { this.stop(); return; }
1010                this.move("prev");
1011            }
1012        };
1013
1014        this.start = function (force) {
1015            if (!!force) {
1016                setTimeout($.proxy(this.next, this), 10);
1017            }
1018            interval = setInterval($.proxy(this.next, this), this.settings.pause);
1019            running = true;
1020        };
1021
1022        this.stop = function (pause) {
1023            clearInterval(interval);
1024            interval = null;
1025            running = !!pause;
1026            active = false;
1027        };
1028
1029        this.active = function () {
1030            return running;
1031        };
1032
1033        this.moving = function () {
1034            return active;
1035        };
1036        
1037        this.navigate(children.filter(".active"));
1038
1039        if (this.settings.clickevents) {
1040            $(this.settings.navigator).on("click", "a", { slider: this }, function (event) {
1041                var activeIndex = children.index(children.filter(".active"));
1042                var index = $(this).parent().children().index($(this));
1043                if (activeIndex !== index) {
1044                    event.data.slider.to(index);
1045                }
1046                event.preventDefault();
1047            });
1048        }
1049        
1050        if (this.settings.hover) {
1051            var slider = this;
1052            element.add(this.settings.navigator)
1053                   .add(element.siblings(".art-shapes")).hover(function () {
1054                if (element.is(":visible") && !last) { slider.stop(true); }
1055            }, function () {
1056                if (element.is(":visible") && !last) { slider.start(); }
1057            });
1058        }
1059    };
1060
1061    $.fn.slider = function (arg) {
1062        return this.each(function () {
1063            var element = $(this),
1064                data = element.data("slider"),
1065                options = typeof arg === "object" && arg;
1066
1067            if (!data) {
1068                data = new Slider(element, options);
1069                element.data("slider", data);
1070            }
1071            
1072            if (typeof arg === "string" && data[arg]) {
1073                data[arg]();
1074            } else if (data.settings.auto && element.is(":visible")) {
1075                data.start();
1076            }
1077        });
1078    };
1079
1080})(jQuery);
1081
1082
1083
1084
1085jQuery(function ($) {
1086    "use strict";
1087    if (!$.browser.msie || parseInt($.browser.version, 10) > 8)
1088        return;
1089    var path = "";
1090    var scripts = $("script[src*='script.js']");
1091    if (scripts.length > 0) {
1092        var src = scripts.get(0).src;
1093        path = src.substr(0, src.indexOf("script.js"));
1094    }
1095    var header = $(".art-header");
1096    var bgimages = "".split(",");
1097    var bgpositions = "".split(",");
1098    for (var i = 0; i < bgimages.length; i++) {
1099        var bgimage = $.trim(bgimages[i]);
1100        if (bgimage === "")
1101            continue;
1102        if (path !== "") {
1103            bgimage = bgimage.replace(/(url\(['"]?)/i, "$1" + path);
1104        }
1105        header.find(".art-shapes").prepend("<div style=\"position:absolute;top:0;left:0;width:100%;height:100%;background:" + bgimage + " " + bgpositions[i] + " no-repeat\">");
1106    }
1107    header.css('background-image', "url('images/header.jpg')".replace(/(url\(['"]?)/i, "$1" + path));
1108    header.css('background-position', "0 0");
1109});
1110
1111jQuery(function () {
1112    'use strict';
1113    artButtonSetup("button");
1114    
1115    var indexURL = jQuery('link[rel="header_link"]').attr('href');
1116    var iframeTagPart = ['<iframe allowtransparency="true" ' , 'background-color:transparent;filter:progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0);"></iframe>'];
1117    if(indexURL && jQuery('header.clickable').length) {
1118        if(jQuery('#art-header-bg').length) {
1119            jQuery('header').append(
1120                (jQuery.browser.msie ? iframeTagPart[0] + 'style="position:absolute;height:100%;width:40000px;left:-20000px;' + iframeTagPart[1] : '' ) +
1121                '<a style="position:absolute;height:100%;width:40000px;left:-20000px;top:0px;z-index:1000;" href="' + indexURL + '"></a>');
1122        } else {
1123            jQuery('header').append(
1124                (jQuery.browser.msie ? iframeTagPart[0] + 'style="position:absolute;height:100%;width:100%;' + iframeTagPart[1] : '' ) +
1125                '<a style="position:absolute;height:100%;width:100%;" href="' + indexURL + '"></a>');
1126        }
1127    }
1128});
1129
1130$().ready(function(){
1131    $(document).on('click','#emodal-overlay' ,function(){
1132        $('.emodal-close').trigger('click');
1133        //console.log('click');
1134    });
1135});

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.