PageSourceSearch

https://min1tanahdatar.sch.id/wp-content/themes/MIN1TanahDatar/script.js?ver=7.0

js min1tanahdatar.sch.id collected 2026-10-04 08:40:24 UTC 50,252 bytes, 1,375 lines download raw bytes

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

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.