PageSourceSearch

https://loterianacional.gob.do/media/plg_jchoptimize/cache/js/5584b4c83e8c9eeff52f5b9dc6ab970a_3.js

js loterianacional.gob.do collected 2026-10-02 21:50:21 UTC 91,048 bytes, 2,514 lines download raw bytes

1try {
2/* Created by Artisteer v4.3.0.60745 */
3/*jshint forin:true, noarg:true, noempty:true, eqeqeq:true, bitwise:true, strict:true, undef:true, curly:false, browser:true, jquery:false */
4/*global jQuery BackgroundHelper */
5
6// css helper
7browser = function ($) {
8    'use strict';
9    var data = [
10        { str: navigator.userAgent, sub: 'Chrome', ver: 'Chrome', name: 'chrome' },
11        { str: navigator.vendor, sub: 'Apple', ver: 'Version', name: 'safari' },
12        { prop: window.opera, ver: 'Opera', name: 'opera' },
13        { str: navigator.userAgent, sub: 'Firefox', ver: 'Firefox', name: 'firefox' },
14        { str: navigator.userAgent, sub: 'MSIE', ver: 'MSIE', name: 'ie' },
15        { str: navigator.userAgent, sub: 'Trident/7.0', ver: 'rv', name: 'ie' }
16    ];
17    var v = function (s, n) {
18        var i = s.indexOf(data[n].ver);
19        return (i !== -1) ? parseFloat(s.substring(i + data[n].ver.length + 1)) : 0;
20    };
21    var result = { name: 'unknown', version: 0 };
22    var html = $('html');
23    for (var n = 0; n < data.length; n++) {
24        if (!result[data[n].name]) {
25            result[data[n].name] = false;
26        }
27        if ((data[n].str && (data[n].str.indexOf(data[n].sub) !== -1)) || data[n].prop) {
28            result.name = data[n].name;
29            result[result.name] = true;
30            result.version = v(navigator.userAgent, n) || v(navigator.appVersion, n);
31            html.addClass(result.name + ' ' + result.name + parseInt(result.version, 10));
32        }
33    }
34    return result;
35} (jQuery);
36
37jQuery(function ($) {
38    if (typeof responsiveDesign === "undefined") {
39        $("html").addClass("desktop");
40    }
41});
42
43jQuery(function ($) {
44    'use strict';
45    var i, j, k, l, m;
46    if (!browser.ie || browser.version !== 9) {
47        return;
48    }
49    var splitByTokens = function (str, startToken, endToken, last) {
50        if (!last) {
51            last = false;
52        }
53        var startPos = str.indexOf(startToken);
54        if (startPos !== -1) {
55            startPos += startToken.length;
56            var endPos = last ? str.lastIndexOf(endToken) : str.indexOf(endToken, startPos);
57
58            if (endPos !== -1 && endPos > startPos) {
59                return str.substr(startPos, endPos - startPos);
60            }
61        }
62        return '';
63    };
64
65    var splitWithBrackets = function (str, token, brackets) {
66        /*jshint nonstandard:true */
67        if (!token) {
68            token = ',';
69        }
70        if (!brackets) {
71            brackets = '()';
72        }
73        var bracket = 0;
74        var startPos = 0;
75        var result = [];
76        if (brackets.lenght < 2) {
77            return result;
78        }
79        var pos = 0;
80        while (pos < str.length) {
81            var ch = str[pos];
82            if (ch === brackets[0]) {
83                bracket++;
84            }
85            if (ch === brackets[1]) {
86                bracket--;
87            }
88            if (ch === token && bracket < 1) {
89                result.push(str.substr(startPos, pos - startPos));
90                startPos = pos + token.length;
91            }
92            pos++;
93        }
94        result.push(str.substr(startPos, pos - startPos));
95        return result;
96    };
97
98    var byteToHex = function (d) {
99        var hex = Number(d).toString(16);
100        while (hex.length < 2) {
101            hex = "0" + hex;
102        }
103        return hex;
104    };
105
106    for (i = 0; i < document.styleSheets.length; i++) {
107        var s = document.styleSheets[i];
108        var r = [s];
109        for (j = 0; j < s.imports.length; j++) {
110            r.push(s.imports[j]);
111        }
112        for (j = 0; j < r.length; j++) {
113            s = r[j];
114            var n = [];
115            for (k = 0; k < s.rules.length; k++) {
116                var css = s.rules[k].cssText || s.rules[k].style.cssText;
117                if (!css) {
118                    continue;
119                }
120                var value = splitByTokens(css, '-svg-background:', ';');
121                if (value === '') {
122                    continue;
123                }
124                var values = splitWithBrackets(value);
125                for (l = 0; l < values.length; l++) {
126                    var g = splitByTokens(values[l], 'linear-gradient(', ')', true);
127                    if (g === '') {
128                        continue;
129                    }
130                    var args = splitWithBrackets(g);
131                    if (args.length < 3) {
132                        continue;
133                    }
134                    var maxOffset = 0;
135                    var stops = [];
136                    for (m = 1; m < args.length; m++) {
137                        var stopValues = splitWithBrackets($.trim(args[m]), ' ');
138                        if (stopValues.length < 2) {
139                            continue;
140                        }
141                        var stopColor = $.trim(stopValues[0]);
142                        var stopOpacity = 1;
143                        if (stopColor == 'transparent') {
144                            stopColor = '#000000';
145                            stopOpacity = 0;
146                        }
147                        var colorRgba = splitByTokens(stopColor, 'rgba(', ')', true);
148                        var stopOffset = $.trim(stopValues[1]);
149                        if (colorRgba !== "") {
150                            var rgba = colorRgba.split(',');
151                            if (rgba.length < 4) {
152                                continue;
153                            }
154                            stopColor = '#' + byteToHex(rgba[0]) + byteToHex(rgba[1]) + byteToHex(rgba[2]);
155                            stopOpacity = rgba[3];
156                        }
157                        var isPx = stopOffset.indexOf('px') !== -1;
158                        if (isPx) {
159                            maxOffset = Math.max(maxOffset, parseInt(stopOffset, 10) || 0);
160                        }
161                        stops.push({ offset: stopOffset, color: stopColor, opacity: stopOpacity, isPx: isPx });
162                    }
163                    var stopsXML = '';
164                    var lastStop = null;
165                    for (m = 0; m < stops.length; m++) {
166                        if (stops[m].isPx) {
167                            stops[m].offset = ((parseInt(stops[m].offset, 10) || 0) / (maxOffset / 100)) + '%';
168                        }
169                        stopsXML += '<stop offset="' + stops[m].offset + '" stop-color="' + stops[m].color + '" stop-opacity="' + stops[m].opacity + '"/>';
170                        if (m === stops.length - 1) {
171                            lastStop = stops[m];
172                        }
173                    }
174                    var isLeft = $.trim(args[0]) === 'left';
175                    var direction = 'x1="0%" y1="0%" ' + (isLeft ? 'x2="100%" y2="0%"' : 'x2="0%" y2="
175100%"');
176                    var gradientLength = '100%';
177                    if (maxOffset > 0) {
178                        gradientLength = maxOffset + 'px';
179                    }
180                    var size = (isLeft ? 'width="' + gradientLength + '" height="100%"' : 'width="100%" height="' + gradientLength + '"');
181                    var last = "";
182                    if (lastStop !== null && maxOffset > 0) {
183                        last = '<rect ' +
184                            (isLeft ?
185                                'x="' + maxOffset + '" y="0"' :
186                                'x="0" y="' + maxOffset + '"') +
187                            ' width="100%" height="100%" style="fill:' + lastStop.color + ';opacity:' + lastStop.opacity + ';"/>';
188
189                    }
190                    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>';
191                    values[l] = values[l].replace('linear-gradient(' + g + ')', 'url(data:image/svg+xml,' + escape(svgGradient) + ')');
192                }
193                n.push({ s: s.rules[k].selectorText, v: 'background: ' + values.join(",") });
194            }
195            for (k = 0; k < n.length; k++) {
196                s.addRule(n[k].s, n[k].v);
197            }
198        }
199    }
200});
201
202
203jQuery(function ($) {
204    "use strict";
205    // ie8
206    if (!browser.ie || browser.version > 8) return;
207    $('.art-shapes').each(function () {
208        if ($(this).siblings('.art-slider').length) {
209            $(this).remove();
210        } else {
211            $(this).css('z-index', 1);
212        }
213    });
214
215    // ie7
216    if (!browser.ie || browser.version > 7) return;
217    var textblockTexts = $('.art-textblock div[class$="-text"]');
218    textblockTexts.each(function () {
219        var tbText = $(this);
220        var valign = tbText.css('vertical-align') ? tbText.css('vertical-align') : 'top';
221        if (valign === 'middle') {
222            var wrapper = tbText.wrap('<div/>').parent();
223            tbText.css({
224                'position': 'relative',
225                'top': '-50%',
226                'height': 'auto'
227            });
228            wrapper.css({
229                'position': 'absolute',
230                'top': '50%'
231            });
232        } else if (valign === 'bottom') {
233            tbText.css({
234                'position': 'absolute',
235                'height': 'auto',
236                'bottom': 0
237            });
238        }
239    });
240});
241
242/* Set wmode=transparent for youtube and other video hostings to show it under the menus, lightboxes etc. */
243jQuery(function ($) {
244    "use strict";
245    var video = ["youtube"];
246
247    $("iframe[src]").each(function () {
248        var iframe = $(this),
249            src = iframe.attr("src"),
250            isVideo = false,
251            i;
252
253        for (i = 0; i < video.length; i++) {
254            if (src.toLowerCase().indexOf(video[i].toLowerCase()) !== -1) {
255                isVideo = true;
256                break;
257            }
258        }
259
260        if (!isVideo) {
261            return;
262        }
263
264        if (src.lastIndexOf("?") !== -1) {
265            src += "&amp;wmode=transparent";
266        } else {
267            src += "?wmode=transparent";
268        }
269        iframe.attr("src", src);
270    });
271});
272
273jQuery(function ($) {
274    "use strict";
275    $(window).bind("resize", function () { navigatorResizeHandler($("html").hasClass("responsive")); });
276});
277
278var navigatorResizeHandler = (function ($) {
279    "use strict";
280    return function (responsiveDesign) {
281        if (responsiveDesign) return;
282        $(".art-slider").each(function () {
283            var slider = $(this);
284            var sliderWidth = slider.width();
285            var nav = slider.siblings(".art-slidenavigator");
286            var navWidth = nav.outerWidth();
287            if (nav.length && navWidth < sliderWidth) {
288                // left offset
289                var left = nav.attr("data-left");
290                // (margin = containerWidth - (objectPosition + objectWidth)) < 0
291                var margin = sliderWidth - sliderWidth * parseFloat(left) / 100 - nav.outerWidth(false);
292                if (margin < 0) {
293                    nav.css("margin-left", margin);
294                }
295            }
296        });
297    };
298})(jQuery);
299
300var processElementMultiplyBg = (function ($) {
301    return (function (selector, info) {
302        if (!selector || !info || !info.bgimage || !info.bgposition || !info.images || !info.positions) return;
303        var path = "";
304        var script = $('head script[src*="script.js"]');
305        if (script.length) {
306            path = (script.attr('src') || '');
307            path = path.substr(0, path.lastIndexOf('/') + 1);
308        }
309        var html = '';
310        var el = $(selector);
311        var bgimages = info.images.split(",");
312        var bgpositions = info.positions.split(",");
313        for (var i = bgimages.length - 1; i >= 0; i--) {
314            var bgimage = $.trim(bgimages[i]);
315            if (bgimage === "")
316                continue;
317            var imgIdx = bgimage.lastIndexOf('images/');
318            var className = bgimage.substring(imgIdx + 7, bgimage.length - 6);
319            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>");
320        }
321        el.css('background-image', info.bgimage.replace(/(images\/[^\/]+)$/, path + '$1'));
322        el.css('background-position-x', "50%");
323        el.css('background-position-y', "50%");
324    });
325})(jQuery);
326
327
328var responsiveNavigator = (function ($) {
329    "use strict";
330    return function () {
331        if (typeof headerObjectResizer !== 'undefined' && headerObjectResizer.isPreview) return;
332
333        var sheet = $('.art-sheet');
334        var sheetWidth = sheet.outerWidth();
335
336        $(".art-slider").each(function () {
337            var currentSlider = $(this);
338            var currentSliderWidth = currentSlider.width();
339
340            var sliderNavigator = currentSlider.siblings(".art-slidenavigator");
341            if (sliderNavigator.length) {
342                var off = sheetLeftFunc(sheet, sliderNavigator);
343                var calcWidth = isContentSlider(sliderNavigator) ? currentSliderWidth : sheetWidth;
344
345                var navigatorWidth = sliderNavigator.outerWidth();
346                var offset = parseInt(sliderNavigator.attr('data-offset') || 0, 10);
347
348                // left offset
349                sliderNavigator.css('margin-left', '0px');
350
351                var left = parseFloat(sliderNavigator.attr("data-left"), 10);
352                var newLeft = off + uniToPx(left, navigatorWidth, calcWidth);
353                sliderNavigator.css('left', newLeft + 'px');
354
355
356                // reset top to original value
357                sliderNavigator.css("top", "");
358
359                // top
360                var navigatorHeight = sliderNavigator.outerHeight();
361                var uniy = parseFloat(sliderNavigator.attr('data-top'), 10);
362
363                var sliderHeight = parseInt(currentSlider.css('height'), 10);
364                var newTop = uniToPx(uniy, navigatorHeight, sliderHeight);
365
366                sliderNavigator.css("top", (newTop + offset) + 'px');
367            }
368        });
369    };
370})(jQuery);
371
372jQuery(function ($) {
373    "use strict";
374
375    if (typeof responsiveDesign === "undefined") {
376        $(window).bind("resize", responsiveNavigator);
377    }
378
379    $(window).on("load", function pageInitialize() {
380        $(window).trigger("resize");
381        $(window).off("load", pageInitialize);
382    });
383});
384
385
386/* Icons in Header should have display block.
387 * Otherwise, in case of inline-block there's a space gap in some browsers (Opera 12.16) and icon is cutted.
388 */
389if (browser.opera) {
390    jQuery(function ($) {
391        $(".art-header a[class$='tag-icon']").css("display", "block");
392    });
393}
394
395jQuery(function($) {
396    "use strict";
397     $(window).bind("resize", function () {
398        /*global responsiveDesign */
399        "use strict";
400        if (typeof responsiveDesign !== "undefined" && responsiveDesign.isResponsive)
401            return;
402        var sheetLeft = $(".art-sheet").offset().left;
403        $("header.art-header #art-flash-area").each(function () {
404            var object = $(this);
405            object.css("left", sheetLeft + "px");
406        });
407    });
408});
409
410jQuery(function($) {
411    "use strict";
412    $('nav.art-nav').addClass("desktop-nav");
413});
414
415
416jQuery(function ($) {
417    "use strict";
418    if (!browser.ie || browser.version > 7) {
419        return;
420    }
421    $('ul.art-hmenu>li:not(:first-child)').each(function () { $(this).prepend('<span class="art-hmenu-separator"> </span>'); });
422});
423
424jQuery(function ($) {
425    "use strict";
426    $("ul.art-hmenu a:not([href])").attr('href', '#').click(function (e) { e.preventDefault(); });
427});
428
429
430jQuery(function ($) {
431    "use strict";
432    if (!browser.ie || browser.version > 7) {
433        return;
434    }
435
436    /* Fix width of submenu items.
437    * The width of submenu item calculated incorrectly in IE6-7. IE6 has wider items, IE7 dis
437play items like stairs.
438    */
439    $.each($("ul.art-hmenu ul"), function () {
440        var maxSubitemWidth = 0;
441        var submenu = $(this);
442        var subitem = null;
443        $.each(submenu.children("li").children("a"), function () {
444            subitem = $(this);
445            var subitemWidth = subitem.outerWidth(false);
446            if (maxSubitemWidth < subitemWidth) {
447                maxSubitemWidth = subitemWidth;
448            }
449        });
450        if (subitem !== null) {
451            var subitemBorderLeft = parseInt(subitem.css("border-left-width"), 10) || 0;
452            var subitemBorderRight = parseInt(subitem.css("border-right-width"), 10) || 0;
453            var subitemPaddingLeft = parseInt(subitem.css("padding-left"), 10) || 0;
454            var subitemPaddingRight = parseInt(subitem.css("padding-right"), 10) || 0;
455            maxSubitemWidth -= subitemBorderLeft + subitemBorderRight + subitemPaddingLeft + subitemPaddingRight;
456            submenu.children("li").children("a").css("width", maxSubitemWidth + "px");
457        }
458    });
459});
460
461jQuery(function ($) {
462    "use strict";
463    var setDirection = function() {
464        setHMenuOpenDirection({
465            container: "div.art-sheet",
466            defaultContainer: "#art-main",
467            menuClass: "art-hmenu",
468            leftToRightClass: "art-hmenu-left-to-right",
469            rightToLeftClass: "art-hmenu-right-to-left"
470        });
471    };
472    if (typeof responsiveDesign !== "undefined") {
473        $(window).on('responsive', setDirection);
474    } else {
475        setDirection();
476    }
477});
478
479var setHMenuOpenDirection = (function ($) {
480    "use strict";
481    return (function(menuInfo) {
482        var defaultContainer = $(menuInfo.defaultContainer);
483        defaultContainer = defaultContainer.length > 0 ? defaultContainer = $(defaultContainer[0]) : null;
484
485        $("ul." + menuInfo.menuClass + ">li>ul").each(function () {
486            var submenu = $(this);
487
488            var submenuWidth = submenu.outerWidth(false);
489            var submenuLeft = submenu.offset().left;
490
491            var mainContainer = submenu.parents(menuInfo.container);
492            mainContainer = mainContainer.length > 0 ? mainContainer = $(mainContainer[0]) : null;
493
494            var container = mainContainer || defaultContainer;
495            if (container !== null) {
496                var containerLeft = container.offset().left;
497                var containerWidth = container.outerWidth(false);
498
499                if (submenuLeft + submenuWidth >= containerLeft + containerWidth) {
500                    /* right to left */
501                    submenu.addClass(menuInfo.rightToLeftClass).find("ul").addClass(menuInfo.rightToLeftClass);
502                } else if (submenuLeft <= containerLeft) {
503                    /* left to right */
504                    submenu.addClass(menuInfo.leftToRightClass).find("ul").addClass(menuInfo.leftToRightClass);
505                }
506            }
507        });
508    });
509})(jQuery);
510
511
512var menuExtendedCreate = (function ($) {
513    "use strict";
514    return function () {
515        var sheet = $(".art-sheet");
516        var sheetLeft = sheet.offset().left;
517        var sheetWidth = sheet.width();
518
519        $(".art-hmenu>li").each(function(i, v) {
520            var itm = $(this);
521            var subm = itm.children("ul");
522            if (subm.length === 0) {
523                return;
524            }
525
526            // reset
527            itm.removeClass("ext ext-r ext-l");
528            itm.css("width", "").find(".ext-off,.ext-m,.ext-l,.ext-r").remove();
529            subm.children("li").children("a").css("width", "");
530
531            var lw = 0, rw = 0;
532        
533            if (typeof subm.attr("data-ext-l") !== "undefined" && typeof subm.attr("data-ext-r") !== "undefined") {
534                lw = parseInt(subm.attr("data-ext-l"), 10) + 0;
535                rw = parseInt(subm.attr("data-ext-r"), 10) + 0;
536                itm.addClass("ext-r").addClass("ext-l");
537            } else {
538                var ltr = !subm.hasClass("art-hmenu-right-to-left");
539                itm.addClass(ltr ? "ext-r" : "ext-l");
540            }
541
542            var shadow = 0;
543            if (subm.length > 0) {
544                var lnk = itm.children("a");
545                var lnkWidth = lnk.outerWidth(false);
546                itm.css("width", Math.round(parseFloat(lnkWidth, 10)) + "px");
547                var menubarMargin = 1 * 2; // margin * 2 sides
548                var menubarBorder = 1 * 2; // border 1 side
549                var submWidth = subm.width() + shadow + menubarMargin + menubarBorder;
550                var w = submWidth - lnkWidth;
551                $("<div class=\"ext-off\"></div>").insertBefore(lnk);
552                $("<div class=\"ext-m\"></div>").insertBefore(lnk);
553                if (w < 0) {
554                    var submA = subm.children("li").children("a");
555                    var pL = parseInt(submA.css("padding-left").replace("px", ""), 10) || 0;
556                    var pR = parseInt(submA.css("padding-right").replace("px", ""), 10) || 0;
557                    var bL = parseInt(submA.css("border-left").replace("px", ""), 10) || 0;
558                    var bR = parseInt(submA.css("border-right").replace("px", ""), 10) || 0;
559                    subm.children("li").children("a").css("width", (lnkWidth - pL - pR - bL - bR) + "px");
560                    submWidth = subm.width() + shadow + menubarMargin + menubarBorder;
561                    w = submWidth - lnkWidth;
562                }
563                $("<div class=\"ext-l\" style=\"width: " + (lw > 0 ? lw : Math.round(parseFloat(w, 10))) + "px;\"></div>").insertBefore(lnk);
564                $("<div class=\"ext-r\" style=\"width: " + (rw > 0 ? rw : Math.round(parseFloat(w, 10))) + "px;\"></div>").insertBefore(lnk);
565                itm.addClass("ext");
566            }
567        });
568    };
569})(jQuery);
570jQuery(window).load(menuExtendedCreate);
571
572jQuery(function ($) {
573    'use strict';
574    $(window).bind('resize', function () {
575        var bh = $('body').height();
576        var mh = 0;
577        var c = $('div.art-content');
578        c.removeAttr('style');
579
580        $('#art-main').children().each(function() {
581            if ($(this).css('position') !== 'absolute') {
582                mh += $(this).outerHeight(true);
583            }
584        });
585        
586        if (mh < bh) {
587            var r = bh - mh;
588            c.css('height', (c.parent().outerHeight(true) + r) + 'px');
589        }
590    });
591
592    if (browser.ie && browser.version < 8) {
593        $(window).bind('resize', function() {
594            var c = $('div.art-content');
595            var s = c.parent().children('.art-layout-cell:not(.art-content)');
596            var w = 0;
597            c.hide();
598            s.each(function() { w += $(this).outerWidth(true); });
599            c.w = c.parent().width(); c.css('width', c.w - w + 'px');
600            c.show();
601        });
602    }
603
604    $(window).trigger('resize');
605});
606
607jQuery(function($) {
608    "use strict";
609    if (!$('html').hasClass('ie7')) {
610        return;
611    }
612    $('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>'); });
613});
614jQuery(function() {
615    "use strict";
616    setPopupVMenuOpenDirection({container: "div.art-sheet", defaultContainer: "#art-main", vMenuClass: "art-vmenu", leftToRightClass: "art-vmenu-left-to-right", rightToLeftClass: "art-vmenu-right-to-left"});
617    fixPopupVMenu({vMenuClass: "art-vmenu", vMenuLayoutCellClass: "art-layout-cell"});
618});
619
620
621var setPopupVMenuOpenDirection = (function ($) {
622    "use strict";
623    return (function(vMenuInfo) {
624        var defaultContainer = $(vMenuInfo.defaultContainer);
625        defaultContainer = defaultContainer.length > 0 ? defaultContainer = $(defaultContainer[0]) : null;
626
627        $("ul." + vMenuInfo.vMenuClass).each(function () {
628            var vmenu = $(this);
629            var submenu = vmenu.find("ul:first");
630            if (submenu.length > 0) {
631                submenu = $(submenu[0]);
632                var submenuWidth = submenu.outerWidth(false);
633
634                var vmenuLeft = vmenu.offset().left;
635                var vmenuWidth = vmenu.outerWidth(false);
636
637                var mainContainer = vmenu.parents(vMenuInfo.container);
638                mainContainer = mainContainer.length > 0 ? mainContainer = $(mainContainer[0]) : null;
639
640                var container = mainContainer || defaultContainer;
641                if (container !== null) {
642                    var containerLeft = container.offset().left;
643                    var containerWidth = container.outerWidth(false);
644
645                    if (vmenuLeft + vmenuWidth + submenuWidth >= containerLeft + containerWidth) {
646                        /* right to left */
647                        vmenu.find("ul")
648                            .removeClass(vMenuInfo.rightToLeftClass)
649                            .removeClass(vMenuInfo.leftToRightClass)
650                            .addClass(vMenuInfo.rightToLeftClass);
651                    } else {
652                        /* left to right */
653                        vmenu.find("ul")
654                            .removeClass(vMenuInfo.rightToLeftClass)
655                            .removeClass(vMenuInfo.leftToRightClass)
656                            .addClass(vMenuInfo.leftToRightClass);
657                    }
658                }
659            }
660        });
661    });
662})(jQuery);
663
664var fixPopupVMenu = (function ($) {
665    "use strict";
666    return (function(fixVMenuInfo)
667    {
668        if (!browser.ie) {
669            return;
670        }
671
672        if (browser.version > 8) {
673            return;
674        }
675
676        /* Add last-child class to emulate :last-child in IE6-7-8*/
677        $("ul." + fixVMenuInfo.vMenuClass + ", ul." + fixVMenuInfo.vMenuClass + " ul").each(function() {
678            $(this).children("li").last().addClass("last-child").children("a").addClass("last-child");
679        });
680
681        if (browser.version > 7) {
682            return;
683        }
684    
685        /* Fix z-index for submenus.
686         * z-index is ignored in IE6-7 if the the absolute element is displayed on the absolute layer's parent siblings.
687         */
688        $("ul." + fixVMenuInfo.vMenuClass).each(function() {
689            var container = $(this);
690            if (container.parents("." + fixVMenuInfo.vMenuLayoutCellClass).length > 0) {
691                while (true) {
692                    if (container.css("position") === "relative" || container.css("position") === "") {
693                        container.css("z-index", "10000");
694                    }
695                    if (container.hasClass(fixVMenuInfo.vMenuLayoutCellClass)) {
696                        break;
697                    }
698                    container = container.parent();
699                }
700            }
701        });
702
703        /* Fix width of submenu items.
704         * The width of submenu item calculated incorrectly in IE6-7. IE6 has wider items, IE7 display items like stairs.
705         */
706        $.each($("ul." + fixVMenuInfo.vMenuClass + " ul"), function() {
707            var maxSubitemWidth = 0;
708            var vsubmenu = $(this);
709            var vsubitem = null;
710            $.each(vsubmenu.children("li").children("a"), function () {
711                vsubitem = $(this);
712                var subitemWidth = vsubitem.outerWidth(false);
713                if (maxSubitemWidth < subitemWidth) {
714                    maxSubitemWidth = subitemWidth;
715                }
716            });
717            if (vsubitem !== null) {
718                var subitemBorderLeft = parseInt(vsubitem.css("border-left-width"), 10) || 0;
719                var subitemBorderRight = parseInt(vsubitem.css("border-right-width"), 10) || 0;
720                var subitemPaddingLeft = parseInt(vsubitem.css("padding-left"), 10) || 0;
721                var subitemPaddingRight = parseInt(vsubitem.css("padding-right"), 10) || 0;
722                maxSubitemWidth -= subitemBorderLeft + subitemBorderRight + subitemPaddingLeft + subitemPaddingRight;
723
724                vsubmenu.children("li").children("a").css("width", maxSubitemWidth + "px");
725            }
726        });
727    });
728})(jQuery);
729
730var artButtonSetup = (function ($) {
731    'use strict';
732    return (function (className) {
733        $.each($("a." + className + ", button." + className + ", input." + className), function (i, val) {
734            var b = $(val);
735            if (!b.hasClass('art-button')) {
736                b.addClass('art-button');
737            }
738            if (b.is('input')) {
739                b.val(b.val().replace(/^\s*/, '')).css('zoom', '1');
740            }
741            b.mousedown(function () {
742                var b = $(this);
743                b.addClass("active");
744            });
745            b.mouseup(function () {
746                var b = $(this);
747                if (b.hasClass('active')) {
748                    b.removeClass('active');
749                }
750            });
751            b.mouseleave(function () {
752                var b = $(this);
753                if (b.hasClass('active')) {
754                    b.removeClass('active');
755                }
756            });
757        });
758    });
759})(jQuery);
760jQuery(function () {
761    'use strict';
762    artButtonSetup("art-button");
763});
764
765jQuery(function($) {
766    'use strict';
767    $('input.art-search-button, form.art-search input[type="submit"]').attr('value', '');
768});
769
770var artRadioButtonSetup = (function ($) {
771    "use strict";
772    return (function (className) {
773        $.each($('label.' + className), function (i, val) {
774            var label = $(val),
775                ctrl = new Control();
776            ctrl.init(label, 'radio', artRadioButtonProcess);
777
778            function artRadioButtonProcess() {
779                var label = $(this),
780                    radio = label.children('input[type="radio"]');
781                if (radio.length === 0) {
782                    return;
783                }
784                //turn off checked attribute from other radiobuttons and div-s
785                $.each($(':radio[name="' + radio.attr('name') + '"]'), function () {
786                    $(this).removeAttr('checked');
787                    $(this).parent().removeClass('art-checked');
788                });
789                radio.attr('checked', 'checked');
790                label.addClass('art-checked');
791            }
792        });
793    });
794})(jQuery);
795jQuery(function () {
796    "use strict";
797    artRadioButtonSetup('art-radiobutton');
798});
799
800var Control = (function ($) {
801    'use strict';
802    return (function () {
803        this.init = function(label, type, callback) {
804            var chAttr = label.find('input[type="' +type + '"]').attr('checked');
805            if (chAttr === 'checked') {
806              label.addClass('art-checked');
807            }
808
809            label.mouseleave(function () {
810              $(this).removeClass('hovered').removeClass('active');
811            });
812            label.mouseover(function () {
813              $(this).addClass('hovered').removeClass('active');
814            });
815            label.mousedown(function (event) {
816              if (event.which !== 1) {
817                  return;
818              }
819              $(this).addClass('active').removeClass('hovered');
820            });
821            label.mouseup(function (event) {
822              if (event.which !== 1) {
823                  return;
824              }
825              callback.apply(this);
826              $(this).removeClass('active').addClass('hovered');
827            });
828        };
829    });
830})(jQuery);
831
832
833jQuery(function ($) {
834    'use strict';
835    $('.art-pager').contents().filter(
836        function () {
837            return this.nodeType === this.TEXT_NODE;
838        }
839    ).remove();
840});
841var fixRssIconLineHeight = (function ($) {
842    "use strict";
843    return function (className) {
844        $("." + className).css("line-height", $("." + className).height() + "px");
845    };
846})(jQuery);
847
848jQuery(function ($) {
849    "use strict";
850    var rssIcons = $(".art-rss-tag-icon");
851    if (rssIcons.length){
852        fixRssIconLineHeight("art-rss-tag-icon");
853        if (browser.ie && browser.version < 9) {
854            rssIcons.each(function () {
855                if ($.trim($(this).html()) === "") {
856                    $(this).css("vertical-align", "middle");
857                }
858            });
859        }
860    }
861});
862var ThemeLightbox = (function ($) {
863    'use strict';
864    return (function () {
865        var images = $(".art-lightbox");
866        var current;
867        this.init = function (ctrl) {
868            $(".art-lightbox").mouseup({ _ctrl: ctrl }, function (e) {
869                if ((e.data._ctrl === true && !e.ctrlKey) || (e.which && e.which !== 1)) {
870                    return;
871                }
872
873                images = $(".art-lightbox");
874
875                current = images.index(this);
876
877                var imgContainer = $('.art-lightbox-wrapper');
878                if (imgContainer.length === 0) {
879                    imgContainer = $('<div class="art-lightbox-wrapper">').css('line-height', $(window).height() + "px")
880                    .appendTo($("body"));
881
882                    var closeBtn = $('<div class="close"><div class="cw"> </div><div class="ccw"> </div><div class="close-alt">&#10007;</div></div>')
883                .click(close);
884                    closeBtn.appendTo(imgContainer);
885                    showArrows();
886                }
887
888                move(current);
889            });
890        };
891
892        function move(index) {
893            if (index < 0 || index >= images.length) {
894                return;
895            }
896
897            showError(false);
898
899            current = index;
900
901            $(".art-lightbox-wrapper .art-lightbox-image:not(.active)").remove();
902
903            var active = $(".art-lightbox-wrapper .active");
904            var target = $('<img class="art-lightbox-image" alt="" src="' + getFullImgSrc($(images[current]).attr("src")) + '" />').click(function () {
905                if ($(this).hasClass("active")) {
906                    move(current + 1);
907                }
908            });
909
910            if (active.length > 0) {
911                active.after(target);
912            } else {
913                $(".art-lightbox-wrapper").append(target);
914            }
915
916            showArrows();
917            showLoader(true);
918
919            bindMouse($(".art-lightbox-wrapper").add(target));
920
921            target.load(function () {
922                showLoader(false);
923
924                active.removeClass("active");
925                target.addClass("active");
926            });
927
928            target.error(function () {
929                showLoader(false);
930                active.removeClass("active");
931                target.addClass("active");
932                target.attr("src", $(images[current]).attr("src"));
933            });
934        }
935
936        function showArrows() {
937            if ($(".art-lightbox-wrapper .arrow").length === 0) {
938                $(".art-lightbox-wrapper").append(
939                    $('<div class="arrow left"><div class="arrow-t ccw"> </div><div class="arrow-b cw"> </div><div class="arrow-left-alt">&#8592;</div></div>')
940                        .css("top", $(window).height() / 2 - 40)
941                        .click(function () {
942                            if (!$(this).hasClass("disabled")) {
943                                move(current - 1);
944                            }
945                        })
946                );
947                $(".art-lightbox-wrapper").append(
948                    $('<div class="arrow right"><div class="arrow-t cw"> </div><div class="arrow-b ccw"> </div><div class="arrow-right-alt">&#8594;</div></div>')
949                        .css("top", $(window).height() / 2 - 40)
950                        .click(function () {
951                            if (!$(this).hasClass("disabled")) {
952                                move(current + 1);
953                            }
954                        })
955                );
956            }
957
958            if (current === 0) {
959                $(".art-lightbox-wrapper .arrow.left").addClass("disabled");
960            } else {
961                $(".art-lightbox-wrapper .arrow.left").removeClass("disabled");
962            }
963
964            if (current === images.length - 1) {
965                $(".art-lightbox-wrapper .arrow.right").addClass("disabled");
966            } else {
967                $(".art-lightbox-wrapper .arrow.right").removeClass("disabled");
968            }
969        }
970
971        function showError(enable) {
972            if (enable) {
973                $(".art-lightbox-wrapper").append($('<div class="lightbox-error">The requested content cannot be loaded.<br/>Please try again later.</div>')
974                        .css({ "top": $(window).height() / 2 - 60, "left": $(window).width() / 2 - 170 }));
975            } else {
976                $(".art-lightbox-wrapper .lightbox-error").remove();
977            }
978        }
979
980        function showLoader(enable) {
981            if (!enable) {
982                $(".art-lightbox-wrapper .loading").remove();
983            }
984            else {
985                $('<div class="loading"> </div>').css({ "top": $(window).height() / 2 - 16, "left": $(window).width() / 2 - 16 }).appendTo($(".art-lightbox-wrapper"));
986            }
987        }
988
989        var close = function () {
990            $(".art-lightbox-wrapper").remove();
991        };
992
993        function bindMouse(img) {
994            img.bind('mousewheel DOMMouseScroll', function (e) {
995                var orgEvent = window.event || e.originalEvent;
996                var delta = (orgEvent.wheelDelta ? orgEvent.wheelDelta : orgEvent.detail * -1) > 0 ? 1 : -1;
997                move(current + delta);
998                e.preventDefault();
999            }).mousedown(function (e) {
1000                // close on middle button click
1001                if (e.which === 2) {
1002                    close();
1003                }
1004                e.preventDefault();
1005            });
1006        }
1007
1008        function getFullImgSrc(src) {
1009            var fileName = src.substring(0, src.lastIndexOf('.'));
1010            var ext = src.substring(src.lastIndexOf('.'));
1011            return fileName + "-large" + ext;
1012        }
1013
1014    });
1015})(jQuery);
1016
1017jQuery(function () {
1018    'use strict';
1019    new ThemeLightbox().init();
1020});
1021
1022(function ($) {
1023    'use strict';
1024    // transition && transitionEnd && browser prefix
1025    $.support.themeTransition = (function () {
1026        var thisBody = document.body || document.documentElement,
1027            thisStyle = thisBody.style,
1028            support = thisStyle.transition !== undefined ||
1029                thisStyle.WebkitTransition !== undefined ||
1030                thisStyle.MozTransition !== undefined ||
1031                thisStyle.MsTransition !== undefined ||
1032                thisStyle.OTransition !== undefined;
1033        return support && {
1034            event: (function () {
1035                return "transitionend webkitTransitionEnd otransitionend oTransitionEnd";
1036            })(),
1037            prefix: (function () {
1038                return ({
1039                    opera: "-o-",
1040                    firefox: "-moz-",
1041                    chrome: "-webkit-",
1042                    safari: "-webkit-",
1043                    ie: ""
1044                }[browser.name] || "");
1045            })()
1046        };
1047    })();
1048
1049    window.BackgroundHelper = function () {
1050        var slides = [];
1051        var direction = "next";
1052        var motion = "horizontal";
1053        var width = 0;
1054        var height = 0;
1055        var multiplier = 1;
1056        var originalWidth = 0;
1057        var originalHeight = 0;
1058        var transitionDuration = "";
1059
1060        this.init = function (motionType, dir, duration) {
1061            direction = dir;
1062            motion = motionType;
1063            slides = [];
1064            width = 0;
1065            height = 0;
1066            multiplier = 1;
1067            originalWidth = 0;
1068            originalHeight = 0;
1069            transitionDuration = duration;
1070        };
1071
1072        this.processSlide = function (element, modify) {
1073            this.updateSize(element, null);
1074            var pos = [];
1075
1076            var bgPosition = element.css("background-position");
1077            var positions = bgPosition.split(",");
1078            $.each(positions, function (i) {
1079                var position = $.trim(this);
1080                var point = position.split(" ");
1081                var zeroValue = browser.ie && browser.version >= 10 ? 0.1 : 0;
1082                if (point.length > 1) {
1083                    var x = point[0].indexOf('%') === -1 ? parseFloat(point[0], 10) : zeroValue;
1084                    var y = point[1].indexOf('%') === -1 ? parseFloat(point[1], 10) : zeroValue;
1085                    pos.push({ x: x, y: y });
1086                } else {
1087                    pos.push({ x: zeroValue, y: zeroValue });
1088                }
1089            });
1090
1091            slides.push({
1092                "images": element.css("background-image"),
1093                "sizes": element.css("background-size"),
1094                "positions": pos
1095            });
1096
1097            if (modify)
1098                element.css("background-image", "none");
1099        };
1100
1101        this.updateSize = function (element, initialSize) {
1102            width = element.outerWidth(false);
1103            height = element.outerHeight();
1104            if (initialSize && parseInt(initialSize.width, 10) !== 0) {
1105                originalWidth = parseInt(initialSize.width, 10);
1106                originalHeight = parseInt(initialSize.height, 10);
1107                if (motion === "fade") {
1108                    $.each(element.children(), function (i) {
1109                        $(this).css("background-position", getCssPositions(slides[i].positions, { x: 0, y: 0 }));
1110                    });
1111                }
1112            }
1113        };
1114
1115        this.setBackground = function (element, items) {
1116            var bg = [];
1117            var sizes = [];
1118            $.each(items, function (i, o) {
1119                bg.push(o.images);
1120                sizes.push(o.sizes);
1121            });
1122            element.css({
1123                "background-image": bg.join(", "),
1124                //"background-size": sizes.join(", "),
1125                "background-repeat": "no-repeat"
1126            });
1127        };
1128
1129        this.setPosition = function (element, items) {
1130            var pos = [];
1131            $.each(items, function (i, o) {
1132                pos.push(o.positions);
1133            });
1134            element.css({
1135                "background-position": pos.join(", ")
1136            });
1137        };
1138
1139        this.current = function (index) {
1140            return slides[index] || null;
1141        };
1142
1143        this.next = function (index) {
1144            var next;
1145            if (direction === "next") {
1146                next = (index + 1) % slides.length;
1147            } else {
1148                next = index - 1;
1149                if (next < 0) {
1150                    next = slides.length - 1;
1151                }
1152            }
1153            return slides[next];
1154        };
1155
1156        this.items = function (prev, next, move) {
1157            var prevItem = { x: 0, y: 0 };
1158            var nextItem = { x: 0, y: 0 };
1159            var isDirectionNext = direction === "next";
1160            var verticalOffset = -(originalHeight - height) / 2;
1161            var horizontalOffset = -(originalWidth - width) / 2;
1162            if (motion === "horizontal") {
1163                prevItem.y = nextItem.y = -(originalHeight - height) / 2;
1164                prevItem.x = horizontalOffset;
1165                nextItem.x = (isDirectionNext ? originalWidth : -originalWidth) + horizontalOffset;
1166                if (move) {
1167                    prevItem.x += isDirectionNext ? -originalWidth : originalWidth;
1168                    nextItem.x += isDirectionNext ? -originalWidth : originalWidth;
1169                }
1170            } else if (motion === "vertical") {
1171                prevItem.x = nextItem.x = horizontalOffset;
1172                prevItem.y = verticalOffset;
1173                nextItem.y = (isDirectionNext ? originalHeight : -originalHeight) + verticalOffset;
1174                if (move) {
1175                    prevItem.y += isDirectionNext ? -originalHeight : originalHeight;
1176                    nextItem.y += isDirectionNext ? -originalHeight : originalHeight;
1177                }
1178            }
1179            var result = [];
1180            if (!!prev) {
1181                result.push({ images: prev.images, positions: getCssPositions(prev.positions, prevItem), sizes: prev.sizes });
1182            }
1183            if (!!next) {
1184                result.push({ images: next.images, positions: getCssPositions(next.positions, nextItem), sizes: next.sizes });
1185            }
1186
1187            if (direction === "next") {
1188                result.reverse();
1189            }
1190
1191            return result;
1192        };
1193
1194        this.transition = function (container, on) {
1195            container.css($.support.themeTransition.prefix + "transition", on ? "background-position " + transitionDuration + " ease-in-out" : "");
1196        };
1197
1198        function getCssPositions(positions, offset) {
1199            var result = [];
1200            if (positions === undefined) {
1201                return "";
1202            }
1203            offset.x = offset.x || 0;
1204            offset.y = offset.y || 0;
1205            for (var i = 0; i < positions.length; i++) {
1206                result.push((positions[i].x * 1 + offset.x) + "px " + (positions[i].y * 1 + offset.y) + "px");
1207            }
1208            return result.join(", ");
1209        }
1210    };
1211
1212
1213    var ThemeSlider = function (element, settings) {
1214
1215        var interval = null;
1216        var active = false;
1217        var children = element.find(".active").parent().children();
1218        var last = false;
1219        var running = false;
1220
1221        this.settings = $.extend({}, {
1222            "animation": "horizontal",
1223            "direction": "next",
1224            "speed": 600,
1225            "pause": 2500,
1226            "auto": true,
1227            "repeat": true,
1228            "navigator": null,
1229            "clickevents": true,
1230            "hover": true,
1231            "helper": null
1232        }, settings);
1233
1234        this.move = function (direction, next) {
1235            var activeItem = element.find(".active"),
1236                nextItem = next || activeItem[direction](),
1237                innerDirection = this.settings.direction === "next" ? "forward" : "back",
1238                reset = direction === "next" ? "first" : "last",
1239                moving = interval,
1240                slider = this, tmp;
1241
1242            active = true;
1243
1244            if (moving) { this.stop(true); }
1245
1246            if (!nextItem.length) {
1247                nextItem = element.find(".art-slide-item")[reset]();
1248                if (!this.settings.repeat) { last = true; active = false; return; }
1249            }
1250
1251            if ($.support.themeTransition) {
1252                nextItem.addClass(this.settings.direction);
1253                tmp = nextItem.get(0).offsetHeight;
1254
1255                activeItem.addClass(innerDirection);
1256                nextItem.addClass(innerDirection);
1257
1258                element.trigger("beforeSlide", children.length);
1259
1260                element.one($.support.themeTransition.event, function () {
1261                    nextItem.removeClass(slider.settings.direction)
1262                        .removeClass(innerDirection)
1263                        .addClass("active");
1264                    activeItem.removeClass("active")
1265                        .removeClass(innerDirection);
1266                    active = false;
1267                    setTimeout(function () {
1268                        element.trigger("afterSlide", children.length);
1269                    }, 0);
1270                });
1271            } else {
1272                element.trigger("beforeSlide", children.length);
1273
1274                activeItem.removeClass("active");
1275                nextItem.addClass("active");
1276                active = false;
1277
1278                element.trigger("afterSlide", children.length);
1279            }
1280
1281            this.navigate(nextItem);
1282
1283            if (moving) { this.start(); }
1284        };
1285
1286        this.navigate = function (position) {
1287            var index = children.index(position);
1288            $(this.settings.navigator).children().removeClass("active").eq(index).addClass("active");
1289        };
1290
1291        this.to = function (index) {
1292            var activeItem = element.find(".active"),
1293                children = activeItem.parent().children(),
1294                activeIndex = children.index(activeItem),
1295                slider = this;
1296
1297            if (index > (children.length - 1) || index < 0) {
1298                return;
1299            }
1300
1301            if (active) {
1302                return element.one("afterSlide", function () {
1303                    slider.to(index);
1304                });
1305            }
1306
1307            if (activeIndex === index) {
1308                return;
1309            }
1310
1311            this.move(index > activeIndex ? "next" : "prev", $(children[index]));
1312        };
1313
1314        this.next = function () {
1315            if (!active) {
1316                if (last) { this.stop(); return; }
1317                this.move("next");
1318            }
1319        };
1320
1321        this.prev = function () {
1322            if (!active) {
1323                if (last) { this.stop(); return; }
1324                this.move("prev");
1325            }
1326        };
1327
1328        this.start = function (force) {
1329            if (!!force) {
1330                setTimeout($.proxy(this.next, this), 10);
1331            }
1332            interval = setInterval($.proxy(this.next, this), this.settings.pause);
1333            running = true;
1334        };
1335
1336        this.stop = function (pause) {
1337            clearInterval(interval);
1338            interval = null;
1339            running = !!pause;
1340            active = false;
1341        };
1342
1343        this.active = function () {
1344            return running;
1345        };
1346
1347        this.moving = function () {
1348            return active;
1349        };
1350
1351        this.navigate(children.filter(".active"));
1352
1353        if (this.settings.clickevents) {
1354            $(this.settings.navigator).on("click", "a", { slider: this }, function (event) {
1355                var activeIndex = children.index(children.filter(".active"));
1356                var index = $(this).parent().children().index($(this));
1357                if (activeIndex !== index) {
1358                    event.data.slider.to(index);
1359                }
1360                event.preventDefault();
1361            });
1362        }
1363
1364        if (this.settings.hover) {
1365            var slider = this;
1366            element.add(this.settings.navigator)
1367                   .add(element.siblings(".art-shapes")).hover(function () {
1368                       if (element.is(":visible") && !last) { slider.stop(true); }
1369                   }, function () {
1370                       if (element.is(":visible") && !last) { slider.start(); }
1371                   });
1372        }
1373    };
1374
1375    $.fn.themeSlider = function (arg) {
1376        return this.each(function () {
1377            var element = $(this),
1378                data = element.data("slider"),
1379                options = typeof arg === "object" && arg;
1380
1381            if (!data) {
1382                data = new ThemeSlider(element, options);
1383                element.data("slider", data);
1384            }
1385
1386            if (typeof arg === "string" && data[arg]) {
1387                data[arg]();
1388            } else if (data.settings.auto && element.is(":visible")) {
1389                data.start();
1390            }
1391        });
1392    };
1393
1394})(jQuery);
1395
1396
1397
1398
1399if (typeof window.resizeData === 'undefined') window.resizeData = {};
1400window.resizeData.headerPageWidth = true;
1401if (typeof window.defaultResponsiveData === 'undefined') window.defaultResponsiveData = [false, true, true, true, true, ];
1402
1403resizeData['positioncontrol-573190647'] = {
1404   responsive: [
1405                  { left: 1, top: 1, visible: true }, 
1406                  { left: 1, top: 1, visible: true }, 
1407                  { left: 1, top: 1, visible: false }, 
1408                  { left: 1, top: 1, visible: false }, 
1409                  { left: 1, top: 1, visible: false }, 
1410               ],
1411   area: {
1412       x: 0,
1413       y: 0
1414   },
1415   width: 242,
1416   height: 50,
1417   autoWidth: false};
1418
1419resizeData['logo-853899090'] = {
1420   responsive: [
1421                  { left: 0.02, top: 0.07, visible: false }, 
1422                  { left: 0.02, top: 0.07, visible: false }, 
1423                  { left: 0.02, top: 0.07, visible: false }, 
1424                  { left: 0.02, top: 0.07, visible: false }, 
1425                  { left: 0.02, top: 0.07, visible: false }, 
1426               ],
1427   area: {
1428       x: 0,
1429       y: 0
1430   },
1431   width: 1,
1432   height: 1,
1433   autoWidth: false};
1434
1435resizeData['logo-917738131'] = {
1436   responsive: [
1437                  { left: 0.14, top: 0.54, visible: false }, 
1438                  { left: 0.14, top: 0.54, visible: false }, 
1439                  { left: 0.14, top: 0.54, visible: false }, 
1440                  { left: 0.14, top: 0.54, visible: false }, 
1441                  { left: 0.14, top: 0.54, visible: false }, 
1442               ],
1443   area: {
1444       x: 0,
1445       y: 0
1446   },
1447   width: 1,
1448   height: 1,
1449   autoWidth: false};
1450
1451resizeData['logo-811524695'] = {
1452   responsive: [
1453                  { left: 0, top: 0.93, visible: true }, 
1454                  { left: 0, top: 0.93, visible: true }, 
1455                  { left: 0, top: 0.93, visible: true }, 
1456                  { left: 0, top: 0.93, visible: true }, 
1457                  { left: 0, top: 0.93, visible: false }, 
1458               ],
1459   area: {
1460       x: 0,
1461       y: 0
1462   },
1463   width: 364,
1464   height: 126,
1465   autoWidth: false};
1466
1467resizeData['logo-1080329338'] = {
1468   responsive: [
1469                  { left: 0, top: 0.32, visible: false }, 
1470                  { left: 0, top: 0.32, visible: false }, 
1471                  { left: 0, top: 0.32, visible: true }, 
1472                  { left: 0, top: 0.32, visible: true }, 
1473                  { left: 0, top: 0.32, visible: true }, 
1474               ],
1475   area: {
1476       x: 0,
1477       y: 0
1478   },
1479   width: 1,
1480   height: 1,
1481   autoWidth: false};
1482
1483resizeData['logo-2124984809'] = {
1484   responsive: [
1485                  { left: 0.05, top: 0.01, visible: false }, 
1486                  { left: 0.05, top: 0.01, visible: false }, 
1487                  { left: 0.05, top: 0.01, visible: false }, 
1488                  { left: 0.05, top: 0.01, visible: false }, 
1489                  { left: 0.05, top: 0.01, visible: true }, 
1490               ],
1491   area: {
1492       x: 0,
1493       y: 0
1494   },
1495   width: 1,
1496   height: 1,
1497   autoWidth: false};
1498
1499resizeData['logo-221469751'] = {
1500   responsive: [
1501                  { left: 0.37, top: 0.28, visible: false }, 
1502                  { left: 0.37, top: 0.28, visible: false }, 
1503                  { left: 0.37, top: 0.28, visible: false }, 
1504                  { left: 0.37, top: 0.28, visible: true }, 
1505                  { left: 0.37, top: 0.28, visible: false }, 
1506               ],
1507   area: {
1508       x: 0,
1509       y: 0
1510   },
1511   width: 1,
1512   height: 1,
1513   autoWidth: false};
1514
1515resizeData['logo-1410294399'] = {
1516   responsive: [
1517                  { left: 0.99, top: 0.07, visible: true }, 
1518                  { left: 0.99, top: 0.07, visible: false }, 
1519                  { left: 0.99, top: 0.07, visible: false }, 
1520                  { left: 0.99, top: 0.07, visible: false }, 
1521                  { left: 0.99, top: 0.07, visible: true }, 
1522               ],
1523   area: {
1524       x: 0,
1525       y: 0
1526   },
1527   width: 236,
1528   height: 44,
1529   autoWidth: false};
1530
1531resizeData['logo-101423910'] = {
1532   responsive: [
1533                  { left: -0.14, top: 0.56, visible: false }, 
1534                  { left: -0.14, top: 0.56, visible: false }, 
1535                  { left: -0.14, top: 0.56, visible: false }, 
1536                  { left: -0.14, top: 0.56, visible: false }, 
1537                  { left: -0.14, top: 0.56, visible: true }, 
1538               ],
1539   area: {
1540       x: 0,
1541       y: 0
1542   },
1543   width: 392,
1544   height: 72,
1545   autoWidth: false};
1546
1547resizeData['logo-1369654984'] = {
1548   responsive: [
1549                  { left: 0.98, top: 0.06, visible: false }, 
1550                  { left: 0.98, top: 0.06, visible: true }, 
1551                  { left: 0.98, top: 0.06, visible: true }, 
1552                  { left: 0.98, top: 0.06, visible: false }, 
1553                  { left: 0.98, top: 0.06, visible: false }, 
1554               ],
1555   area: {
1556       x: 0,
1557       y: 0
1558   },
1559   width: 213,
1560   height: 41,
1561   autoWidth: false};
1562
1563resizeData['object227400126'] = {
1564   responsive: [
1565                  { left: 1, top: 0.51, visible: true }, 
1566                  { left: 1, top: 0.51, visible: true }, 
1567                  { left: 1, top: 0.51, visible: true }, 
1568                  { left: 1, top: 0.51, visible: true }, 
1569                  { left: 1, top: 0.51, visible: true }, 
1570               ],
1571   area: {
1572       x: 0,
1573       y: 0
1574   },
1575   width: 241,
1576   height: 34,
1577   autoWidth: false};
1578
1579// used to apply compicated values in style like '!important!
1580function applyCss(object, param, value) {
1581    var rg = new RegExp(param + '\s*:\s*[^;]+;', "i");
1582    var style = object.attr('style');
1583    var str = param + ': ' + value + ';';
1584    if (rg.test(style)) {
1585        style = style.replace(rg, str);
1586    }
1587    else {
1588        style += '; ' + str;
1589    }
1590
1591    object.attr('style', style);
1592}
1593
1594// convert universal coord to pixels
1595function uniToPx(uni, size, parentSize) {
1596    uni = parseFloat(uni || '0');
1597    if (uni < 0) {
1598        uni = uni * size;
1599    } else if (uni >= 1) {
1600        uni = parentSize - (2 - uni) * size;
1601    } else {
1602        uni = uni * (parentSize - size);
1603    }
1604
1605    return uni;
1606}
1607
1608function isContentSlider(object) {
1609    var isHeader = object.parents('header').length > 0;
1610    if (isHeader) {
1611        return false;
1612    }
1613    var isPageSlider = object.parents('.art-pageslider').length > 0;
1614    if (isPageSlider)
1615        return false;
1616
1617    return true;
1618}
1619
1620function sheetLeftFunc(sheet, object) {
1621    var sheetLeft = sheet.offset().left;
1622
1623    var isHeader = object.parents('header').length > 0;
1624    if (isHeader) {
1625        if (resizeData.headerPageWidth) return sheetLeft;
1626    } else {
1627        var isPageSlider = object.parents('.art-pageslider').length > 0;
1628        if (isPageSlider) {
1629            if (resizeData.pageSliderPageWidth) return sheetLeft;
1630        }
1631    }
1632
1633    return 0;
1634}
1635
1636var headerObjectResizer = {
1637    
1638    postInit: false,
1639
1640    resize: (function ($) {
1641        'use strict';
1642        return function () {
1643            if (!headerObjectResizer.postInit && typeof responsiveDesign !== 'undefined') {
1644                $(window).on('responsiveResize', headerObjectResizer.resize);
1645                headerObjectResizer.postInit = true;
1646            }
1647
1648            var responsiveType = 0;
1649            // if we don't use full custom responsive so we MUST cleanup all styles
1650            var cleanUpStyles = false;
1651            // when use default respo so while in desktop mode always use 0-type, in other case cleanup our styles
1652            if (typeof responsiveDesign !== 'undefined' && 
1653                    defaultResponsiveData[responsiveDesign.responsiveTypeIdx] &&
1654                    responsiveDesign.isResponsive) {
1655                cleanUpStyles = true;
1656            }
1657
1658            if (typeof responsiveDesign !== 'undefined') {
1659                if (responsiveDesign.responsiveType === 'tabletlandscape') {
1660                    responsiveType = 1;
1661                } else if (responsiveDesign.responsiveType === 'tabletportrait') {
1662                    responsiveType = 2;
1663                } else if (responsiveDesign.responsiveType === 'phonelandscape') {
1664                    responsiveType = 3;
1665                } else if (responsiveDesign.responsiveType === 'phoneportrait') {
1666                    responsiveType = 4;
1667                }
1668            }
1669
1670            var sheet = $('.art-sheet');
1671            var sheetWidth = sheet.outerWidth();
1672
1673            var header = $('header');
1674            var height = 0;
1675            var cssPrefix = 'art-';
1676
1677            // move html shapes
1678            var headerQuery = 'header.art-header .art-shapes>*, 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';
1679            var pageSliderQuery = '.art-pageslider .art-slide-item>*';
1680            if (headerObjectResizer.isPreview) {
1681                headerQuery = 'header .art-slider';
1682                pageSliderQuery = '.art-pageslider .art-slider, .art-pageslider .art-textblock';
1683            }
1684            $(headerQuery + ', ' + pageSliderQuery).each(function () {
1685                var object = $(this);
1686                height = object.parent().height();
1687
1688                var off = sheetLeftFunc(sheet, object);
1689
1690                var cls = object.attr('class').split(' ');
1691                $.each(cls, function (key, val) {
1692                    val = $.trim(val);
1693                    if (val.length === 0) return;
1694                    if (val.indexOf(cssPrefix) !== 0) return;
1695
1696                    val = val.substring(cssPrefix.length);
1697                    var data = resizeData[val];
1698                    if (typeof data === 'undefined') return;
1699
1700                    if (cleanUpStyles) {
1701                        object.css('display', '');
1702                        object.css('left', '');
1703                        object.css('margin-left', '');
1704                    }
1705
1706                    var respData = data.responsive[responsiveType];
1707                    if (respData.visible) {
1708                        object.css('display', '');
1709                    } else {
1710                        applyCss(object, 'display', 'none !important');
1711                    }
1712
1713                    if (cleanUpStyles || !respData.visible) return false;
1714
1715                    var x = uniToPx(respData.left, data.autoWidth ? object.width() : data.width, sheetWidth);
1716                    x += off;
1717
1718                    var y = uniToPx(respData.top, data.height, height);
1719
1720                    object.css('left', x + 'px');
1721                    object.css('top', y + 'px');
1722                    applyCss(object, 'margin-left', '0px !important');
1723                    return false;
1724                });
1725            });
1726
1727            // move images in slide's background-images
1728            var slides = $('.art-slide-item').add(header);
1729            if (browser.ie && browser.version <= 8) {
1730                slides = slides.add('.art-slide-item .ie8fix');
1731            }
1732            $.each(slides, function (slideIdx, slide) {
1733                slide = $(slide);
1734
1735                if (slide.closest('.art-collage').length > 0 || cleanUpStyles) {
1736                    slide.css('background-position', '');
1737                    return;
1738                }
1739
1740                var slideVisible = slide.is(':visible');
1741                if (!slideVisible && browser.ie) {
1742                    slide.css('display', 'block');
1743                }
1744
1745                var off = sheetLeftFunc(sheet, slide);
1746
1747                if (browser.ie && browser.version <= 8) {
1748                    var s = slide.attr('style');
1749                    if (s) {
1750                        s = s.replace(/background\-position[^;]+/, '');
1751                        slide.attr('style', s);
1752                    }
1753                } else {
1754                    slide.css('background-position', '');
1755                }
1756                slide.css('background-size', '');
1757
1758                var bgImage = slide.css('background-image') ? slide.css('background-image').split(',') : [];
1759                var bgPosition = slide.css('background-position') && (slide.css('background-position').replace(/[0][^\d]+/gi, '')).length > 0 ?
1760                    slide.css('background-position').split(',') :
1761                    [];
1762                if (bgImage.length !== bgPosition.length) {
1763                    slide.css('display', '');
1764                    return;
1765                }
1766
1767                height = slide.height();
1768                if (height === 0) height = slide.parent().height();
1769
1770                $.each(bgImage, function (idx, val) {
1771                    var findImageIdx = val.lastIndexOf('images/');
1772                    var findDotIdx = val.lastIndexOf('.');
1773                    if (findImageIdx === -1 || findDotIdx === -1) return;
1774
1775                    var name = val.substring(findImageIdx + 7, findDotIdx);
1776
1777                    var data = resizeData[name];
1778                    if (typeof data === 'undefined') return;
1779
1780                    var respData = data.responsive[responsiveType];
1781                    // big default coordinates for hiding
1782                    var x = 9999, y = 9999;
1783                    if (respData.visible) {
1784                        x = uniToPx(respData.left, data.width, sheetWidth);
1785                        x += off + data.area.x;
1786
1787                        y = uniToPx(respData.top, data.height, height);
1788                        y += data.area.y;
1789                    }
1790
1791                    bgPosition[idx] = x + 'px ' + y + 'px';
1792                });
1793
1794                slide.css('background-position', bgPosition.join(','));
1795
1796                if (!slideVisible && browser.ie) {
1797                    slide.css('display', '');
1798                }
1799            });
1800
1801        };
1802    })(jQuery),
1803
1804    initialize: function ($) {
1805        if (!browser.ie || browser.version > 8) {
1806            $(window).on('resize', this.resize);
1807        } else {
1808            var resizeTimeout;
1809            var self = this;
1810            $(window).on("resize", function () {
1811                clearTimeout(resizeTimeout);
1812                resizeTimeout = setTimeout(function () { self.resize(); }, 25);
1813            });
1814        }
1815    }
1816};
1817
1818headerObjectResizer.initialize(jQuery);
1819jQuery(function ($) {
1820    "use strict";
1821    if (!browser.ie || browser.version > 8)
1822        return;
1823    processElementMultiplyBg(".art-header", {
1824        "bgimage": "url('images/header.png')",
1825        "bgposition": "center top",
1826        "images": "",
1827        "positions": ""
1828    });
1829});
1830if (typeof window.resizeData === 'undefined') window.resizeData = {};
1831
1832window.resizeData.pageSliderPageWidth = false;
1833
1834(function ($) {
1835    'use strict';
1836
1837    /*global jQuery, artButtonSetup, browser */
1838
1839    $(function () {
1840        artButtonSetup("btn-primary");
1841        artButtonSetup("btn");
1842        artButtonSetup("button");
1843        artButtonSetup("readon");
1844        artButtonSetup("readmore");
1845    });
1846
1847    $(function ($) {
1848        var links = $('a.art-rss-tag-icon[href="#"]'),
1849            href = $('head link[type="application/rss+xml"]').attr('href');
1850        if (href) {
1851            links.attr('href', href);
1852        } else {
1853            links.hide();
1854        }
1855    });
1856
1857    $(function ($) {
1858        $('.art-messages').each(function () {
1859            $(this).css('display', $(this).find('dl, .alert').length ? '' : 'none');
1860        });
1861    });
1862
1863    $(function ($) {
1864        $('.art-search-button').each(function (i, val) {
1865            var element = $(val),
1866                background = element.css('background-image');
1867
1868            if (-1 !== background.indexOf('url')) {
1869                element.val('');
1870            }
1871            if (element.hasClass('art-button')) {
1872                element.removeClass('art-button');
1873            }
1874        });
1875    });
1876
1877    $(function ($) {
1878        // ie < 9 slider multiple background joomla fix
1879        if (!browser.ie || browser.version > 8) {
1880            return;
1881        }
1882
1883        var scriptSrc = jQuery('script[src*="script.js"]').last().attr('src'),
1884            pathToContentImages = scriptSrc.substr(0, scriptSrc.lastIndexOf('/') + 1) + 'data/images/',
1885            pathToDesignImages = scriptSrc.substr(0, scriptSrc.lastIndexOf('/') + 1) + 'images/';
1886
1887        $('.art-slider .art-slide-item').each(function () {
1888            var ie8fixDiv = $('.ie8fix', this),
1889                slide = $(this);
1890                isDesign = $(this).parents('header').length > 0 ||
1891                    $(this).parents('.art-pageslider').length > 0;
1892                elements = [];
1893
1894            elements.push(slide);
1895            $.each(ie8fixDiv, function (key, object) {
1896                elements.push(object);
1897            });
1898
1899            $.each(elements, function (idx, object) {
1900                var bg = $(object).css('background-image');
1901                if (bg) {
1902                    bg = bg.replace(/url\(["'](.+)["']\)/g, function (match, path) {
1903                        var imageName = path.substr(path.lastIndexOf('/') + 1);
1904                        return 'url(\'' + (isDesign ? pathToDesignImages : pathToContentImages) + imageName + '\')';
1905                    });
1906                    $(object).css('background-image', bg);
1907                }
1908            });
1909        });
1910    });
1911
1912}(jQuery));
1913
1914if ('undefined' !== typeof(MooTools)) {
1915    window.addEvent('domready', function() {
1916        $$('.hasTip').each(function(el) {
1917            var title = el.get('title');
1918            if (title) {
1919                title = title.replace(/<strong>(.*?)<\/strong><br \/>/, '$1 :: ');
1920                var parts = title.split('::', 2);
1921                el.store('tip:title', parts[0]);
1922                el.store('tip:text', parts[1]);
1923            }
1924        });
1925        var JTooltips = new Tips($$('.hasTip'), {"maxTitleChars": 50,"fixed": false});
1926    });
1927}
1928
1929} catch (e) {
1930console.error('Error in file:/templates/br01/script.js; Error:' + e.message);
1931};
1932try {
1933/* Created by Artisteer v4.3.0.60745 */
1934/*jshint forin:true, noarg:true, noempty:true, eqeqeq:true, bitwise:true, strict:true, undef:true, curly:false, browser:true, jquery:false */
1935/*global jQuery */
1936
1937var responsiveDesign = {
1938    isResponsive: false,
1939    isDesktop: false,
1940    isTablet: false,
1941    isPhone: false,
1942    lockedResponsiveMode: '', // free mode from start
1943
1944    responsiveType: 'desktop',
1945    responsiveTypeIdx: 1,
1946    lockedResponsiveType: '',
1947
1948    isCurrentDefaultResponsive: false,
1949
1950    defaultResponsive: [ false, true, true, true, true ], // turn on/off old or new responsive modes
1951
1952    windowWidth: 0,
1953
1954    responsive: (function ($) {
1955        "use strict";
1956        return function () {
1957            var html = $("html");
1958            this.windowWidth = $(window).width();
1959            var triggerEvent = false;
1960
1961            var isRespVisible = $("#art-resp").is(":visible");
1962            if (this.lockedResponsiveMode === 'desktop') isRespVisible = false;
1963
1964            if (isRespVisible && !this.isResponsive) {
1965                html.addClass("responsive").removeClass("desktop");
1966                this.isResponsive = true;
1967                this.isDesktop = false;
1968                triggerEvent = true;
1969            } else if (!isRespVisible && !this.isDesktop) {
1970                html.addClass("desktop").removeClass("responsive default-responsive responsive-tablet responsive-phone");
1971                this.isResponsive = this.isTablet = this.isPhone = false;
1972                this.isDesktop = true;
1973                triggerEvent = true;
1974            }
1975
1976            if (this.isResponsive) {
1977                // additional check to lock responsive mode
1978                var isTablet = this.lockedResponsiveMode === 'tablet' || ($("#art-resp-t").is(":visible") && this.lockedResponsiveMode === '');
1979                var isPhone = this.lockedResponsiveMode === 'phone' || ($("#art-resp-m").is(":visible") && this.lockedResponsiveMode === '');
1980                if (isTablet && !this.isTablet) {
1981                    html.addClass("responsive-tablet").removeClass("responsive-phone");
1982                    this.isTablet = true;
1983                    this.isPhone = false;
1984                    triggerEvent = true;
1985                } else if (isPhone && !this.isPhone) {
1986                    html.addClass("responsive-phone").removeClass("responsive-tablet");
1987                    this.isTablet = false;
1988                    this.isPhone = true;
1989                    triggerEvent = true;
1990                }
1991            }
1992
1993            var prevResponsiveIndx = this.responsiveTypeIdx;
1994            if (this.lockedResponsiveType === 'tabletlandscape' || ($("#art-resp-tablet-landscape").is(":visible") && this.lockedResponsiveType === '')) {
1995                this.responsiveType = 'tabletlandscape';
1996                this.responsiveTypeIdx = 1;
1997            } else if (this.lockedResponsiveType === 'tabletportrait' || ($("#art-resp-tablet-portrait").is(":visible") && this.lockedResponsiveType === '')) {
1998                this.responsiveType = 'tabletportrait';
1999                this.responsiveTypeIdx = 2;
2000            } else if (this.lockedResponsiveType === 'phonelandscape' || ($("#art-resp-phone-landscape").is(":visible") && this.lockedResponsiveType === '')) {
2001                this.responsiveType = 'phonelandscape';
2002                this.responsiveTypeIdx = 3;
2003            } else if (this.lockedResponsiveType === 'phoneportrait' || ($("#art-resp-phone-portrait").is(":visible") && this.lockedResponsiveType === '')) {
2004                this.responsiveType = 'phoneportrait';
2005                this.responsiveTypeIdx = 4;
2006            } else { //if (this.lockedResponsiveType === 'desktop' || ($("#art-resp-desktop").is(":visible") && this.lockedResponsiveType === '')) {
2007                this.responsiveType = 'desktop';
2008                this.responsiveTypeIdx = 0;
2009            }
2010
2011            if (triggerEvent || prevResponsiveIndx !== this.responsiveTypeIdx) {
2012                triggerEvent = true;
2013                
2014                if (this.isResponsive && this.defaultResponsive[ this.responsiveTypeIdx ]) {
2015                    this.isCurrentDefaultResponsive = true;
2016                    html.removeClass('custom-responsive').addClass('default-responsive');
2017                } else {
2018                    this.isCurrentDefaultResponsive = false;
2019                    html.removeClass('default-responsive').addClass('custom-responsive');
2020                }
2021            }
2022
2023            if (triggerEvent) {
2024                $(window).trigger("responsive", this);
2025            }
2026
2027            $(window).trigger("responsiveResize", this);
2028        };
2029    })(jQuery),
2030    initialize: (function ($) {
2031        "use strict";
2032        return function () {
2033            // get correct defaultResponsive
2034            if (typeof defaultResponsiveData !== 'undefined') responsiveDesign.defaultResponsive = defaultResponsiveData;
2035
2036            $("<div id=\"art-resp\"><div id=\"art-resp-m\"></div><div id=\"art-resp-t\"></div></div>").appendTo("body");
2037            $('<div id="art-resp-tablet-landscape" /><div id="art-resp-tablet-portrait" /><div id="art-resp-phone-landscape" /><div id="art-resp-phone-portrait" />').appendTo('body');
2038
2039
2040            /* (1) Use this code for debug instead of (2):
2041             * var resizeTimeout;
2042             * $(window).resize(function () {
2043             * clearTimeout(resizeTimeout);
2044             * resizeTimeout = setTimeout(function () { responsiveDesign.responsive(); }, 50);
2045             * });
2046             */
2047
2048            /* (2) Use this code for production and comment (1): */
2049            $(window).resize(function () {
2050                responsiveDesign.responsive();
2051            });
2052
2053            $(window).trigger("resize");
2054        };
2055    })(jQuery),
2056    // lock responsive in some mode: desktop, tablet or phone for editor
2057    lockResponsiveType: function (mode) {
2058        responsiveDesign.lockedResponsiveType = mode;
2059
2060        if (mode.indexOf('tablet') === 0) mode = 'tablet';
2061        if (mode.indexOf('phone') === 0) mode = 'phone';
2062
2063        responsiveDesign.lockedResponsiveMode = mode;
2064    },
2065    // using in editor to turn off default responsive
2066    toogleDefaultResponsive: function (type, val) {
2067        var old = responsiveDesign.defaultResponsive[ type ];
2068        responsiveDesign.defaultResponsive[ type ] = val;
2069        if (old !== val) responsiveDesign.responsiveTypeIdx = -1;
2070    }
2071};
2072
2073function responsiveAbsBg(responsiveDesign, el, bg) {
2074    "use strict";
2075    if (bg.length === 0)
2076        return;
2077
2078    var desktopBgTop = bg.attr("data-bg-top");
2079    var desktopBgHeight = bg.attr("data-bg-height");
2080
2081    if (responsiveDesign.isResponsive) {
2082        if (typeof desktopBgTop === "undefined" || desktopBgTop === false) {
2083            bg.attr("data-bg-top", bg.css("top"));
2084            bg.attr("data-bg-height", bg.css("height"));
2085        }
2086
2087        var elTop = el.offset().top;
2088        var elHeight = el.outerHeight();
2089        bg.css("top", elTop + "px");
2090        bg.css("height", elHeight + "px");
2091    } else if (typeof desktopBgTop !== "undefined" && desktopBgTop !== false) {
2092        bg.css("top", desktopBgTop);
2093        bg.css("height", desktopBgHeight);
2094        bg.removeAttr("data-bg-top");
2095        bg.removeAttr("data-bg-height");
2096    }
2097}
2098
2099var responsiveImages = (function ($) {
2100    "use strict";
2101    return function (responsiveDesign) {
2102        $("img[width]").each(function () {
2103            var img = $(this), newWidth = "", newMaxWidth = "", newHeight = "";
2104            if (responsiveDesign.isResponsive) {
2105                newWidth = "auto";
2106                newHeight = "auto";
2107                newMaxWidth = "100%";
2108
2109                var widthAttr = img.attr("width");
2110                if (widthAttr !== null && typeof (widthAttr) === "string" && widthAttr.indexOf("%") === -1) {
2111                    newWidth = "100%";
2112                    newMaxWidth = parseInt($.trim(widthAttr), 10) + "px";
2113                }
2114            }
2115            img.css("width", newWidth).css("max-width", newMaxWidth).css("height", newHeight);
2116        });
2117    };
2118})(jQuery); 
2119
2120var responsiveVideos = (function ($) {
2121    "use strict";
2122    return function (responsiveDesign) {
2123        $("iframe[width],object[width],embed[width]").each(function () {
2124            var obj = $(this);
2125            if ((obj.is('[width]') && obj.attr("width").indexOf("%") !== -1) ||
2126                (obj.is('[class]') && obj.attr("class").indexOf("twitter") !== -1) ||
2127                (obj.id && obj.id.indexOf("google") !== -1))
2128                return;
2129            var container = obj.parent(".art-responsive-embed");
2130            if (responsiveDesign.isResponsive) {
2131                if (container.length !== 0)
2132                    return;
2133                container = $("<div class=\"art-responsive-embed\">").insertBefore(obj);
2134                obj.appendTo(container);
2135            } else if (container.length > 0) {
2136                obj.insertBefore(container);
2137                container.remove();
2138            }
2139        });
2140    };
2141})(jQuery);
2142
2143// this must be called for collages only!
2144var responsiveTextblocks = (function ($) {
2145    "use strict";
2146    return function (slider, responsiveDesign) {
2147        slider.find(".art-textblock").each(function () {
2148            if (parseInt(slider.attr("data-width"), 10) === 0) {
2149                return true;
2150            }
2151            var tb = $(this);
2152            var c = slider.width() / slider.attr("data-width");
2153            tb.css({
2154                "height": "",
2155                "width": "",
2156                "top": "",
2157                "margin-left": ""
2158            });
2159            if (responsiveDesign.isResponsive) {
2160                var tbHeight = parseInt(tb.css("height"), 10);
2161                var tbWidth = parseInt(tb.css("width"), 10);
2162                var tbTop = parseInt(tb.css("top"), 10);
2163                var tbMargin = parseInt(tb.css("margin-left"), 10);
2164                tb.add(tb.find('div')).css({
2165                    "height": tbHeight * c,
2166                    "width": tbWidth * c
2167                });
2168                tb.css("top", tbTop * c);
2169                tb.attr("style", function (i, s) { return s + "margin-left: " + (tbMargin * c) + "px !important"; });
2170            }
2171        });
2172    };
2173})(jQuery);
2174
2175var responsiveSlider = (function ($) {
2176    "use strict";
2177    return function (responsiveDesign) {
2178        $(".art-slider").each(function () {
2179            var s = $(this);
2180
2181            var isHeaderSlider = s.parent('.art-header').length > 0 || s.parent('.art-pageslider').length > 0;
2182            if (!isHeaderSlider && responsiveDesign.isResponsive) {
2183                responsiveTextblocks(s, responsiveDesign);
2184                return;
2185            }
2186
2187            var initialWidth = s.attr("data-width");
2188            var initialHeight = s.attr("data-height");
2189
2190            // set size
2191
2192            var obj = s.data("slider");
2193            if (!obj) {
2194                return false;
2195            }
2196
2197            var inner = s.find(".art-slider-inner");
2198
2199            if (!responsiveDesign.isResponsive && obj.settings.helper) {
2200                obj.settings.helper.updateSize(inner, { width: initialWidth, height: initialHeight });
2201                return;
2202            }
2203
2204            // set slider
2205            if (obj && obj.settings.helper) {
2206                $(window).on("responsiveResize", function updateSize() {
2207                    if (obj.settings.animation === "fade") return;
2208                    if (responsiveDesign.isCurrentDefaultResponsive) {
2209                        obj.settings.helper.updateSize(inner, { width: initialWidth, height: initialHeight });
2210                        $.each(inner.children(), function () {
2211                            $(this).css(
2212                                "background-position",
2213                                -Math.floor(initialWidth / 2 - parseInt(inner.outerWidth(), 10) / 2) + "px" +
2214                                -Math.floor(initialHeight / 2 - parseInt(inner.outerHeight(), 10) / 2) + "px "
2215                            );
2216                        });
2217                    } else {
2218                        $(window).off("responsiveResize", updateSize);
2219                    }
2220                });
2221            }
2222        });
2223    };
2224})(jQuery);
2225
2226var responsiveCollages = (function ($) {
2227    "use strict";
2228    return function (responsiveDesign) {
2229        $(".art-collage").each(function() {
2230            var collage = $(this);
2231            var slider = collage.find(".art-slider");
2232
2233            var initialWidth = slider.attr("data-width");
2234            var initialHeight = slider.attr("data-height");
2235
2236            var parent = collage.closest(':not(.image-caption-wrapper, .art-collage)');
2237            var parentIcw = collage.closest('.image-caption-wrapper');
2238            var parentWidth = parent.width();
2239            var collageWidth = collage.width();
2240
2241            // for responsive try to make collage smaller
2242            // a) no icw - check collage width and parent
2243            // b) with icw - collage is bigger than icw
2244            var doms = collage
2245                .add(slider)
2246                .add(collage.closest(".image-caption-wrapper"));
2247
2248            // so try to make collage smaller
2249            if (responsiveDesign.isResponsive && collageWidth > parentWidth || (parentIcw.length > 0 && collageWidth > parentIcw.width())) {
2250                doms.css("width", "100%");
2251            }
2252
2253            // but if icw make collage too bit reset it width to noraml
2254            collageWidth = collage.width();
2255            if (collageWidth > initialWidth) {
2256                doms.css("width", "");
2257            }
2258
2259            var c = slider.width() / initialWidth;
2260            var h = c * initialHeight;
2261            slider.css("height", h + "px");
2262        });
2263    };
2264})(jQuery);
2265
2266
2267jQuery(window).bind("responsive", (function ($) {
2268    "use strict";
2269    return function (event, responsiveDesign) {
2270        // so this event is main and it generate sub events to make important changes before we will modify slider
2271        // for example we move out of slider menu button, and it change slider size
2272        $(window).trigger('responsivePage', responsiveDesign);
2273        responsiveImages(responsiveDesign);
2274        responsiveVideos(responsiveDesign);
2275
2276        responsiveSlider(responsiveDesign);
2277        responsiveNavigator(responsiveDesign);
2278    };
2279})(jQuery));
2280
2281jQuery(window).bind("responsiveResize", (function ($) {
2282    "use strict";
2283    return function (event, responsiveDesign) {
2284        responsiveCollages(responsiveDesign);
2285        responsiveNavigator(responsiveDesign);
2286    };
2287})(jQuery));
2288
2289jQuery(function ($) {
2290    if (!browser.ie || browser.version > 8) return;
2291    var timeout;
2292    $(window).on("resize", function () {
2293        clearTimeout(timeout);
2294        timeout = setTimeout(function() {
2295            responsiveCollages(responsiveDesign);
2296            responsiveNavigator(responsiveDesign);
2297        }, 25);
2298    });
2299    responsiveCollages(responsiveDesign);
2300    responsiveNavigator(responsiveDesign);
2301});
2302
2303var responsiveHeader = (function ($) {
2304    "use strict";
2305    return function(responsiveDesign) {
2306        var header = $("header.art-header");
2307        var headerSlider = header.find(".art-slider");
2308
2309        if (headerSlider.length) {
2310            var firstSlide = headerSlider.find(".art-slide-item").first();
2311            var slidebg = firstSlide.css("background-image").split(",");
2312            var previousSibling = headerSlider.prev();
2313            var sliderNav = headerSlider.siblings(".art-slidenavigator");
2314            if (slidebg.length && responsiveDesign.isResponsive) {
2315                // if prev is menu in header
2316                if (previousSibling.is("nav.art-nav")) {
2317                    sliderNav.attr("data-offset", previousSibling.height());
2318                }
2319            } else {
2320                sliderNav.removeAttr("data-offset");
2321                header.removeAttr("style");
2322            }
2323        }
2324    };
2325})(jQuery);
2326
2327jQuery(window).bind("responsiveResize", (function ($) {
2328    "use strict";
2329    return function (event, responsiveDesign) {
2330        responsiveAbsBg(responsiveDesign, $(".art-header"), $("#art-header-bg"));
2331    };
2332})(jQuery));
2333
2334jQuery(window).bind("responsive", (function ($) {
2335    "use strict";
2336    return function (event, responsiveDesign) {
2337        if (browser.ie && browser.version <= 8) return;
2338
2339        if (responsiveDesign.isResponsive) {
2340            $(window).on("responsiveResize.header", function () {
2341                responsiveHeader(responsiveDesign);
2342            });
2343        } else {
2344            $(window).trigger("responsiveResize.header");
2345            $(window).off("responsiveResize.header");
2346        }
2347    };
2348})(jQuery));
2349
2350jQuery(window).bind("responsiveResize", (function ($) {
2351    "use strict";
2352    return function (event, responsiveDesign) {
2353        responsiveAbsBg(responsiveDesign, $("nav.art-nav"), $("#art-hmenu-bg"));
2354        $(window).trigger("responsiveNav", { responsiveDesign: responsiveDesign });
2355    };
2356})(jQuery));
2357
2358
2359
2360
2361jQuery(function ($) {
2362    "use strict";
2363    $(".art-hmenu a")
2364        .click(function(e) {
2365            var link = $(this);
2366            if ($(".responsive").length === 0)
2367                return;
2368
2369            var item = link.parent("li");
2370            
2371            if (item.hasClass("active")) {
2372                item.removeClass("active").children("a").removeClass("active");
2373            } else {
2374                item.addClass("active").children("a").addClass("active");
2375            }
2376
2377            if (item.children("ul").length > 0) {
2378                var href = link.attr("href");
2379                link.attr("href", "#");
2380                setTimeout(function () { 
2381                    link.attr("href", href);
2382                }, 300);
2383                e.preventDefault();
2384            }
2385        })
2386        .each(function() {
2387            var link = $(this);
2388            if (link.get(0).href === location.href) {
2389                link.addClass("active").parents("li").addClass("active");
2390                return false;
2391            }
2392        });
2393});
2394
2395
2396jQuery(function($) {
2397    $('<a href=\"#\" class=\"art-menu-btn\"><span></span><span></span><span></span></a>').insertBefore(".art-hmenu").click(function(e) {
2398        var menu = $(this).next();
2399        if (menu.is(":visible")) {
2400            menu.slideUp("fast", function() {
2401                $(this).removeClass("visible").css("display", "");
2402            });
2403        } else {
2404            menu.slideDown("fast", function() {
2405                $(this).addClass("visible").css("display", "");
2406            });
2407        }
2408        e.preventDefault();
2409    });
2410});
2411
2412jQuery(window).bind("responsiveNav", (function ($) {
2413    /*global menuExtendedCreate */
2414    "use strict";
2415    return function (event, options) {
2416        if (options.responsiveDesign.isDesktop && $("li.ext").length > 0) {
2417            menuExtendedCreate();
2418        }
2419    };
2420})(jQuery));
2421
2422var responsiveLayoutCell = (function ($) {
2423    "use strict";
2424    return function (responsiveDesign) {
2425        $(".art-content .art-content-layout-row,.art-footer .art-content-layout-row").each(function () {
2426            var row = $(this);
2427            var rowChildren = row.children(".art-layout-cell");
2428            if (rowChildren.length > 0) {
2429                var c;
2430                row.removeClass("responsive-layout-row-2").removeClass("responsive-layout-row-3").removeClass("responsive-layout-row-1");
2431                if (rowChildren.length === 1) {
2432                    c = 1;
2433                    row.addClass("responsive-layout-row-1");
2434                } else if (rowChildren.length % 2 === 0) {
2435                    var c = 2;
2436                    row.addClass("responsive-layout-row-2");
2437                } else {
2438                    var c = 3;
2439                    row.addClass("responsive-layout-row-3");
2440                }
2441                if (c > 0 && responsiveDesign.isTablet) {
2442                    rowChildren.addClass("responsive-tablet-layout-cell").each(function (i) {
2443                        if ((i + 1) % c === 0) {
2444                            $(this).after("<div class=\"cleared responsive-cleared\">");
2445                        }
2446                    });
2447                } else {
2448                    rowChildren.removeClass("responsive-tablet-layout-cell");
2449                    row.children(".responsive-cleared").remove();
2450                }
2451            }
2452        });
2453    };
2454})(jQuery);
2455
2456jQuery(window).bind("responsive", function (event, responsiveDesign) {
2457    "use strict";
2458
2459    responsiveLayoutCell(responsiveDesign);
2460});
2461
2462/*global jQuery, responsiveDesign*/
2463
2464jQuery(window).bind("responsive", (function ($) {
2465    "use strict";
2466    return function (event, responsiveDesign) {
2467        if (typeof setPopupVMenuOpenDirection !== "undefined" && responsiveDesign.isDesktop) {
2468            setPopupVMenuOpenDirection({
2469                container: "div.art-sheet", 
2470                defaultContainer: "#art-main", 
2471                vMenuClass: "art-vmenu", 
2472                leftToRightClass: "art-vmenu-left-to-right", 
2473                rightToLeftClass: "art-vmenu-right-to-left"});
2474        }
2475    };
2476})(jQuery));
2477
2478jQuery(function ($) {
2479    "use strict";
2480    $(".art-vmenu>li>a").click(function(event) {
2481        if (responsiveDesign.isResponsive) {
2482            var link = $(this), 
2483                submenu = link.siblings("ul");
2484            if (submenu.length === 0)
2485                return;
2486            if (submenu.is(":visible")) {
2487                submenu.slideUp("fast", function() {
2488                    $(this).removeClass("vmenu-resp-popup-visible").css("display", "");
2489                });
2490            } else {
2491                submenu.slideDown("fast", function() {
2492                    $(this).addClass("vmenu-resp-popup-visible").css("display", "");
2493                });
2494            }
2495            event.preventDefault();
2496            return false;
2497        }
2498    });
2499});
2500
2501
2502
2503//setTimeout(function () { $("html").addClass("desktop") }, 0);
2504
2505if (!browser.ie || browser.version > 8) {
2506    jQuery(responsiveDesign.initialize);
2507} else {
2508    jQuery("html").addClass("desktop");
2509}
2510
2511} catch (e) {
2512console.error('Error in file:/templates/br01/script.responsive.js; Error:' + e.message);
2513};
2514

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.