PageSourceSearch

https://www.amionline.org/App_Themes/Responsive/js/Theme.js

js amionline.org collected 2026-10-05 02:51:53 UTC 17,940 bytes, 206 lines download raw bytes

1// Polifill for browsers which does not support indexOf Ref: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf
2if (!Array.prototype.indexOf) { Array.prototype.indexOf = function (e, t) { var n; if (this == null) { throw new TypeError('"this" is null or not defined') } var r = Object(this); var i = r.length >>> 0; if (i === 0) { return -1 } var s = +t || 0; if (Math.abs(s) === Infinity) { s = 0 } if (s >= i) { return -1 } n = Math.max(s >= 0 ? s : i - Math.abs(s), 0); while (n < i) { var o; if (n in r && r[n] === e) { return n } n++ } return -1 } }
3
4/**
5 * jQuery.browser.mobile Plugin.
6 * Updated: October 23rd, 2013
7**/
8(function (a) { (jQuery.browser = jQuery.browser || {}).mobile = /android.+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|e\-|e\/|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(di|rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|xda(\-|2|g)|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4)) })(navigator.userAgent || navigator.vendor || window.opera);
9
10/**
11 * jQuery.footerPusher Plugin.
12 * By: B.P.I.
13 * Version: 1.0.0
14 * Updated: November 11th, 2012
15 **/
16(function (a) { a.fn.extend({ footerPusher: function (b) { b = a.extend({ substractList: [], substractConst: 0 }, b); (b.substractList.length || b.substractConst.length) && function (b, d, f) { function e() { for (var a = f, c = 0; c < d.length; c++) d[c] instanceof jQuery && (a += d[c].outerHeight()); b.css("min-height", jQuery(window).height() - a) } a(document).bind("ready", e); a(window).bind("resize", e) } (this, b.substractList, b.substractConst) } }) })(jQuery);
17
18/**
19 * LazyLoad Module.
20 * By: Kukui Corp
21 * Version: 1.0.0
22 * Updated: July 30th, 2014
23**/
24(function (f, p, q) { function l(e, g) { f.each(f.map(e.data(), function (c, a) { return a }), function (c, a) { /^lazyload(.*?)/i.test(a) && e.removeData(a).removeAttr("data-lazyload-" + a.replace(/lazyload/g, "")) }); g && e.addClass(g) } function k(e) { function g(b, a) { if (/^\S+\.(gif|jpg|jpeg|png|svg)$/i.test(a)) b.append('<img src="' + a + '" alt="" />'); else if (/^\S+\.(js)$/i.test(a)) b.append('<script type="text/javascript" src="' + a + '">\x3c/script>'); else if (/^\S+\.(mp4|m4v|mov|ogv|flv|webm|asf|avi)$/i.test(a)) b.append('<video src="' + a + '" controls="controls" />'); else if (/^\S+\.(mp3|m4a|ogg|oga|webma|wav)$/i.test(a)) b.append('<audio src="' + a + '" controls="controls" />'); else if (/^\S+\.(swf|pdf)$/i.test(a)) b.append('<object><embed src="' + a + '" /></object>'); else if (/^\S+\.(x?html?|aspx?|php)($|\?.*?)/i.test(a)) b.append('<iframe src="' + a + '"></iframe>'); else return !1; return !0 } function c(b, a) { return /^\S+\.(png|jpe?g|gif|svg)$/i.test(a) ? (b.css("background-image", "url(" + a + ")"), !0) : !1 } function a(b, a) { if (b.is('img,iframe,script,embed,input[type="image"],video,audio,source,track')) { var c = b.attr("src"); if ("undefined" === typeof c || /^(\s*||\s*about\s*:\s*blank\s*|[^\S]*#?\/?\\?[^\S]*)$/i.test(c)) return b.attr("src", a), !0 } return !1 } null == e && (e = f("[data-lazyload-src]").filter(function () { var b = f(this); return b.is("[data-lazyload-domtrigger]") ? !1 : b.is("[data-lazyload-group]") ? b.is('[data-lazyload-group=""]') : !0 })); e.each(function () { var b = f(this), d = b.data("lazyload-src"), n = (n = b.data("lazyload-type")) ? n : "auto"; switch (b.data("lazyload-type")) { case "source": case "src": a(b, d); break; case "html": case "tag": g(b, d); break; case "background": case "bgimg": case "bg": c(b, d); break; default: a(b, d) || !b.is(":empty") && b.html().trim() && c(b, d) || g(b, d) } l(b, "mod-lazyload-loaded") }) } var h = f(p), m = f(q); m.on("ready.mod-lazyload scriptloaded.mod-lazyload", function () { m.off("ready.mod-lazyload scriptloaded.mod-lazyload"); var e = !1; h.on("load", function () { e || (e = !0, k(null)) }); setTimeout(function () { e || (e = !0, k(null)) }, 5E3); m.on("click", "[data-lazyload-itemtrigger]", function (c) { var a = f(this); c = f(c.delegateTarget).find('[data-lazyload-group="' + a.data("lazyload-itemtrigger") + '"]'); if ("undefined" === typeof a.data("lazyload-portion")) l(a); else { var b = /^([1-9]+[0-9]*)$/.test(a.data("lazyload-portion")) ? parseInt(a.data("lazyload-portion")) : 0; 0 < b && b <= c.length ? c = c.slice(0, b) : l(a) } k(c) }); var g = f("[data-lazyload-domtrigger]"); g.length && (h.on("resize.lazyload scroll.lazyload", function (c) { var a = h.data("tempLazyloadSettings"), b = { x: h.scrollLeft(), y: h.scrollTop(), width: h.width(), height: h.height() }, d = !1; if (a) { if ("scroll" == c.type) { if (b.y - 50 >= a.y || b.y + 50 <= a.y) a.y = b.y, d = !0; if (b.x - 50 >= a.x || b.x + 50 <= a.x) a.x = b.x, d = !0 } else "resize" == c.type && (b.width - 50 >= a.width ? (a.width = b.width, d = !0) : b.width < a.width && (a.width = b.width), b.height >
24= a.height + 50 ? (a.height = b.height, d = !0) : b.height < a.height && (a.height = b.height, d = !0)); h.data("tempLazyloadSettings", a) } else h.data("tempLazyloadSettings", b), d = !0; d && (c = g.filter(function () { var a = f(this), c = a.offset().left - 400, d = a.offset().top - 400, e = a.outerWidth(!0) + 800, a = a.outerHeight(!0) + 800; return d > b.y + b.height || d + a < b.y || c > b.x + b.width || c + e < b.x ? !1 : !0 }), 0 < c.length && (k(c.filter(function () { var a = f(this); if (/^$|\s+/.test(a.data("lazyload-domtrigger"))) return !0; k(f('[data-lazyload-group="' + a.data("lazyload-domtrigger") + '"]')); l(a); return !1 })), c.length == g.length ? (g = void 0, h.off("resize.lazyload").off("scroll.lazyload")) : g = g.not(c))) }), h.trigger("resize.lazyload")) }) })(jQuery, window, document);
25
26/**
27 * Lightbox Module.
28 * By: Kukui Corp
29 * Version: 1.0.3
30 * Updated: December 16th, 2014
31**/
32(function(c,s,f){function k(b){return/^$|\s+/.test(b)?null:/^(\s*[A-Za-z0-9-_]+\s*)$/.test(b)?c('[data-lightbox-window="'+b+'"]'):c(b)}function h(b){var a=c(f.body);b&&b.length?b.is(":visible")?(b.fadeOut(function(){b.removeClass("mod-lightbox-on");a.removeClass("mod-lightbox-on");d.find("[data-lightbox-window]:visible").length||m.off("resize.mod-lightbox")}),b.find("video,audio").each(function(){"undefined"===typeof this.paused||this.paused||this.pause()}),b.find('iframe[src*="youtube.com"]').each(function(){"undefined"!== typeof this.contentWindow&&this.contentWindow.postMessage('{"event":"command", "func":"stopVideo", "args":""}',"*")})):(b.fadeIn(function(){b.addClass("mod-lightbox-on");a.addClass("mod-lightbox-on")}),m.on("resize.mod-lightbox",function(a){d.find("[data-lightbox-window]:visible").each(function(){var a=c(this),b=a.find(".mod-lightbox-shell"),a=a.find(".mod-lightbox-shell .mod-lightbox-content");if(b.length&&a.length){var g=m,d=g.width(),g=g.height(),f=b.outerWidth(!0)-b.width(),h=b.outerHeight(!0)- b.height(),e=a.prop("scrollWidth"),q=a.outerWidth(!0)-a.width(),l=a.prop("scrollHeight"),k=a.outerHeight(!0)-a.height(),n=d-(f+q),p=g-(h+k),r=Math.ceil(Math.sqrt(d/g*e*l));if(e<r||d<f+q+e)e=r;if(e<n)b.css("max-width",e+q+"px"),a.css("max-width",e+"px");else if(e==n||50<=n)b.css("max-width",d-f+"px"),a.css("max-width",n+"px");if(l<p)b.css("max-height",l+k+"px"),a.css("max-height",l+"px");else if(l==p||50<=p)b.css("max-height",g-h+"px"),a.css("max-height",p+"px");b.css({position:"fixed",top:(g-b.outerHeight(!0))/ 2+"px",left:(d-b.outerWidth(!0))/2+"px"})}})}),m.trigger("resize.mod-lightbox")):a.removeClass("mod-lightbox-on")}var m=c(s),d=c(f);d.on("ready.mod-lightbox scriptloaded.mod-lightbox",function(){d.off("ready.mod-lightbox scriptloaded.mod-lightbox");var b=c("[data-lightbox-window]");b.length&&(b.each(function(){var a=c(this);a.is(":visible")&&a.hide();if(a.is("[data-lightbox-template]"))switch(a.data("lightbox-template")){default:a.addClass("mod-lightbox").wrapInner('<div class="mod-lightbox-content"></div>').prepend('<a class="mod-lightbox-btn-close" data-lightbox-close="'+ a.data("lightbox-window")+'" href="javascript:void(0);" title="Close popup.">X</a>').wrapInner('<div class="mod-lightbox-shell"></div>').prepend('<div class="mod-lightbox-background" data-lightbox-close="'+a.data("lightbox-window")+'"></div>')}}),b.on("click","[data-lightbox-close]",function(a){var b=c(this);a=k(b.data("lightbox-close"))||c(a.delegateTarget);h(a)}),d.on("click change","[data-lightbox-open]",function(a){a=c(this);a=k(a.data("lightbox-open"))||a.find("[data-lightbox-window]");h(a)}).on("keydown", function(a){27==a.which&&c(f.body).hasClass("mod-lightbox-on")&&(a=c("[data-lightbox-window]:visible:first"),a.length&&!a.find(":focus").length&&h(c("[data-lightbox-window]:visible:first")))}))})})(jQuery,window,document);
33
34
35
36/**
37* Default browsers behaviour modifications.
38**/
39jQuery(document).ready(function () {
40    // Disable phone links (href="tel:...") on desktop browser.
41    if (typeof (jQuery.browser.mobile) != 'undefined' && !jQuery.browser.mobile) {
42        jQuery('a[href^="tel:"]').click(function () {
43            return false;
44        });
45    }
46
47    // Navigation submenus functionality for touch devices.
48    if ((typeof (jQuery.browser.mobile) != 'undefined' && jQuery.browser.mobile)) {
49        (function ($) {
50            var selectedItem = null;
51
52            $('[role="menubar"] li:has(ul) > a').bind('click touchstart MSPointerDown', function (e) {
53                var menuItem = $(e.target).parent();
54                if (selectedItem == null || !menuItem.is(selectedItem)) {
55                    var submenu = menuItem.find('ul:hidden:first');
56                    if (submenu.length) {
57                        submenu.show();
58                    }
59
60                    selectedItem = menuItem;
61                    e.preventDefault();
62                }
63            });
64
65
66            $(document).bind('click touchstart MSPointerDown', function (e) {
67                var current = $(e.target);
68                if (selectedItem != null && !current.parents().is(selectedItem)) {
69                    selectedItem.find('ul:visible:first').hide();
70                    selectedItem = null;
71                }
72            });
73        })(jQuery);
74    }
75});
76
77
78/**
79* Repair gallery.
80**/
81jQuery(document).ready(function ($) {
82    $('.jsCarRepairGallery img').each(function () {
83        var current = $(this);
84        if (current.parent().is('a')) {
85            var parent = current.parent();
86            if (parent.attr('href').match(/^\S+\.(gif|jpg|jpeg|png)$/) && !parent.attr('rel')) {
87                parent.attr('rel', 'lightbox[entry-content]');
88            }
89        }
90        else {
91            current.wrap('<a href="' + current.attr('src') + '" rel="lightbox[entry-content]" />');
92            current.wrap('<span/>');
93        }
94    });
95});
96
97
98/**
99* Forms.
100**/
101jQuery(document).ready(function () {
102    jQuery('form:has(input[type="submit"], input[type="button"], button[type="submit"])').each(function () {
103        jQuery(this).prepend('<input type="hidden" name="csSfs" value="' + window.location.href + '" />');
104    });
105});
106
107function SubmitHandler(sender, validationGroup) {
108    window.scrollTo = function (x, y) { return true; }
109
110    if (typeof (Page_ClientValidate) == 'function') {
111        if (Page_ClientValidate(validationGroup) == false) {
112            if (typeof (Page_ValidationSummaries) != 'undefined' && Page_ValidationSummaries.length) {
113                for (var i = 0; i < Page_ValidationSummaries.length; i++) {
114                    if (Page_ValidationSummaries[i].validationGroup == validationGroup) {
115                        Page_ValidationSummaries[i].setAttribute('class', 'textbox error');
116                        break;
117                    }
118                }
119            }
120
121            return false;
122        }
123    }
124
125    if (sender.getAttribute('type').match(/(?:button|submit)/g)) {
126        sender.disabled = true;
127    }
128
129    return true;
130}
131
132
133/**
134* Utils.
135**/
136jQuery(document).ready(function () {
137    // ASP.NET Ajax append content to.
138    (function ($) {
139        if (window.Sys && Sys.WebForms && Sys.WebForms.PageRequestManager) {
140            var prm = Sys.WebForms.PageRequestManager.getInstance();
141            prm.add_pageLoaded(function () {
142                $('[class*="js-ajax-apendto"]').each(function () {
143                    var buffer = $(this);
144                    if (buffer.html().length) {
145                        var recipientSelector;
146                        if (recipientSelector = buffer.attr('class').match(/(?:^|\s)js-ajax-apendto-[A-Za-z]+[\w\-]*(?:$|\s)/i)) {
147                            recipientSelector = recipientSelector[0].replace(/(^\s+|js-ajax-apendto-?|\s+$)/gi, '');
148
149                            $(buffer.html())
150                                .hide()
151                                .appendTo($('#' + recipientSelector + ', .' + recipientSelector))
152                                .fadeIn(1000);
153                        }
154                    }
155                });
156            });
157        }
158    })(jQuery);
159});
160
161// Read more links in CouponsList widget  
162jQuery(document).ready(function () {
163    (function ($) {
164        $(document).on('click', '.js-text-remainder .js-link-more, .js-text-remainder .js-link-less', function () {
165            $(this).closest('.js-text-remainder').find('.js-text-more, .js-link-more, .js-link-less').toggle(500);
166        });
167    })(jQuery);
168});
169
170/**
171* Phone Replacement
172**/
173
174(function (window, document, $) {
175    $.fn.replaceText = function (b, a, c) { return this.each(function () { var f = this.firstChild, g, e, d = []; if (f) { do { if (f.nodeType === 3) { g = f.nodeValue; e = g.replace(b, a); if (e !== g) { if (!c && /</.test(e)) { $(f).before(e); d.push(f) } else { f.nodeValue = e } } } } while (f = f.nextSibling) } d.length && $(d).remove() }) }
176    jQuery(document).ready(function () { jQuery(document).on("trackingNumbersLoaded", function (m, c) { function l(a, b) { var c = a.substring(1, 4), d = a.substring(6, 9), e = a.substring(10, 14), f = b.substring(1, 4), g = b.substring(6, 9), h = b.substring(10, 14), k = new RegExp("(\\(?)" + c + "(\\))?([-. ]?)" + d + "([-. ]?)" + e, "g"); jQuery("body *").not(".js-privacypolicy").replaceText(k, "$1" + f + "$2$3" + g + "$4" + h, !1); jQuery("a").each(function (a) { a = jQuery(this).attr("href"); "undefined" != typeof a && (a = unescape(a).replace(k, "$1" + f + "$2$3" + g + "$4" + h), jQuery(this).attr("href", a)); a = jQuery(this).attr("title"); "undefined" != typeof a && (a = a.replace(k, "$1" + f + "$2$3" + g + "$4" + h), jQuery(this).attr("title", a)) }) } function d() { for (var a = 0; a < c.length; a++) { var b = c[a]; "" != b.original && "" != b.replacement && l(b.original, b.replacement) } } var e = window.location.pathname.split("/"); void 0 != e[1] && "privacy-policy" == e[1] && jQuery(".entryContent, .entry-content , .entryContent * , .entry-content *").addClass("js-privacypolicy"); d(); jQuery("body").on("DOMNodeInserted", function (a) { null != a.target.innerHTML && null != a.target.innerHTML && null != a.target.innerHTML.match("googleInfoWindow") && d() }) }) });
177})(window, document, jQuery);
178
179// Homepage Popup
180$(document).ready(function () {
181    function setCookie(name, value, days) {
182        var expires = "";
183        if (days) {
184            var date = new Date();
185            date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
186            expires = "; expires=" + date.toUTCString();
187        }
188        document.cookie = name + "=" + (value || "") + expires + "; path=/";
189    }
190    function getCookie(name) {
191        var nameEQ = name + "=";
192        var ca = document.cookie.split(';');
193        for (var i = 0; i < ca.length; i++) {
194            var c = ca[i];
195            while (c.charAt(0) == ' ') c = c.substring(1, c.length);
196            if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
197        }
198        return null;
199    }
200    // if (getCookie("fca-popup") == null || getCookie("fca-popup") == undefined) {
201    //     setTimeout(function () {
202    //         $(".fca-popup-open").trigger("click");
203    //         setCookie("fca-popup", "true", 0.5);
204    //     }, 1000)
205    // }
206})

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.