/*
This file includes the necesary code for the list items popout navigation menu type.
Features: Adds active class to current link and it's parent links. Prevents page change on initial tap on mobile device.
*/
/*! jQuery UI - v1.10.3 - 2013-06-12
* http://jqueryui.com
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
(function (e, t) {
var i = 0,
s = Array.prototype.slice,
n = e.cleanData;
e.cleanData = function (t) {
for (var i, s = 0; null != (i = t[s]); s++) try {
e(i).triggerHandler("remove")
} catch (a) { }
n(t)
}, e.widget = function (i, s, n) {
var a, r, o, h, l = {},
u = i.split(".")[0];
i = i.split(".")[1], a = u + "-" + i, n || (n = s, s = e.Widget), e.expr[":"][a.toLowerCase()] = function (t) {
return !!e.data(t, a)
}, e[u] = e[u] || {}, r = e[u][i], o = e[u][i] = function (e, i) {
return this._createWidget ? (arguments.length && this._createWidget(e, i), t) : new o(e, i)
}, e.extend(o, r, {
version: n.version,
_proto: e.extend({}, n),
_childConstructors: []
}), h = new s, h.options = e.widget.extend({}, h.options), e.each(n, function (i, n) {
return e.isFunction(n) ? (l[i] = function () {
var e = function () {
return s.prototype[i].apply(this, arguments)
},
t = function (e) {
return s.prototype[i].apply(this, e)
};
return function () {
var i, s = this._super,
a = this._superApply;
return this._super = e, this._superApply = t, i = n.apply(this, arguments), this._super = s, this._superApply = a, i
}
}(), t) : (l[i] = n, t)
}), o.prototype = e.widget.extend(h, {
widgetEventPrefix: r ? h.widgetEventPrefix : i
}, l, {
constructor: o,
namespace: u,
widgetName: i,
widgetFullName: a
}), r ? (e.each(r._childConstructors, function (t, i) {
var s = i.prototype;
e.widget(s.namespace + "." + s.widgetName, o, i._proto)
}), delete r._childConstructors) : s._childConstructors.push(o), e.widget.bridge(i, o)
}, e.widget.extend = function (i) {
for (var n, a, r = s.call(arguments, 1), o = 0, h = r.length; h > o; o++)
for (n in r[o]) a = r[o][n], r[o].hasOwnProperty(n) && a !== t && (i[n] = e.isPlainObject(a) ? e.isPlainObject(i[n]) ? e.widget.extend({}, i[n], a) : e.widget.extend({}, a) : a);
return i
}, e.widget.bridge = function (i, n) {
var a = n.prototype.widgetFullName || i;
e.fn[i] = function (r) {
var o = "string" == typeof r,
h = s.call(arguments, 1),
l = this;
return r = !o && h.length ? e.widget.extend.apply(null, [r].concat(h)) : r, o ? this.each(function () {
var s, n = e.data(this, a);
return n ? e.isFunction(n[r]) && "_" !== r.charAt(0) ? (s = n[r].apply(n, h), s !== n && s !== t ? (l = s && s.jquery ? l.pushStack(s.get()) : s, !1) : t) : e.error("no such method '" + r + "' for " + i + " widget instance") : e.error("cannot call methods on " + i + " prior to initialization; " + "attempted to call method '" + r + "'")
}) : this.each(function () {
var t = e.data(this, a);
t ? t.option(r || {})._init() : e.data(this, a, new n(r, this))
}), l
}
}, e.Widget = function () { }, e.Widget._childConstructors = [], e.Widget.prototype = {
widgetName: "widget",
widgetEventPrefix: "",
defaultElement: "
",
options: {
disabled: !1,
create: null
},
_createWidget: function (t, s) {
s = e(s || this.defaultElement || this)[0], this.element = e(s), this.uuid = i++, this.eventNamespace = "." + this.widgetName + this.uuid, this.options = e.widget.extend({}, this.options, this._getCreateOptions(), t), this.bindings = e(), this.hoverable = e(), this.focusable = e(), s !== this && (e.data(s, this.widgetFullName, this), this._on(!0, this.element, {
remove: function (e) {
e.target === s && this.destroy()
}
}), this.document = e(s.style ? s.ownerDocument : s.document || s), this.window = e(this.document[0].defaultView || this.document[0].parentWindow)), this._create(), this._trigger("create", null, this._getCreateEventData()), this._init()
},
_getCreateOptions: e.noop,
_getCreateEventData: e.noop,
_create: e.noop,
_init: e.noop,
destroy: function () {
this._destroy()
, this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName))
, this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName + "-disabled " + "ui-state-disabled")
, this.bindings.unbind(this.eventNamespace)
//, this.hoverable.removeClass("ui-state-hover")
//, this.focusable.removeClass("ui-state-focus")
},
_destroy: e.noop,
widget: function () {
return this.element
},
option: function (i, s) {
var n, a, r, o = i;
if (0 === arguments.length) return e.widget.extend({}, this.options);
if ("string" == typeof i)
if (o = {}, n = i.split("."), i = n.shift(), n.length) {
for (a = o[i] = e.widget.extend({}, this.options[i]), r = 0; n.length - 1 > r; r++) a[n[r]] = a[n[r]] || {}, a = a[n[r]];
if (i = n.pop(), s === t) return a[i] === t ? null : a[i];
a[i] = s
} else {
if (s === t) return this.options[i] === t ? null : this.options[i];
o[i] = s
} return this._setOptions(o), this
},
_setOptions: function (e) {
var t;
for (t in e) this._setOption(t, e[t]);
return this
},
_setOption: function (e, t) {
return this.options[e] = t
, "disabled" === e && (this.widget().toggleClass(this.widgetFullName + "-disabled ui-state-disabled", !!t).attr("aria-disabled", t)
//, this.hoverable.removeClass("ui-state-hover")
//, this.focusable.removeClass("ui-state-focus")
), this
},
enable: function () {
return this._setOption("disabled", !1)
},
disable: function () {
return this._setOption("disabled", !0)
},
_on: function (i, s, n) {
var a, r = this;
"boolean" != typeof i && (n = s, s = i, i = !1), n ? (s = a = e(s), this.bindings = this.bindings.add(s)) : (n = s, s = this.element, a = this.widget()), e.each(n, function (n, o) {
function h() {
return i || r.options.disabled !== !0 && !e(this).hasClass("ui-state-disabled") ? ("string" == typeof o ? r[o] : o).apply(r, arguments) : t
}
"string" != typeof o && (h.guid = o.guid = o.guid || h.guid || e.guid++);
var l = n.match(/^(\w+)\s*(.*)$/),
u = l[1] + r.eventNamespace,
c = l[2];
c ? a.delegate(c, u, h) : s.bind(u, h)
})
},
_off: function (e, t) {
t = (t || "").split(" ").join(this.eventNamespace + " ") + this.eventNamespace, e.unbind(t).undelegate(t)
},
_delay: function (e, t) {
function i() {
return ("string" == typeof e ? s[e] : e).apply(s, arguments)
}
var s = this;
return setTimeout(i, t || 0)
},
_hoverable: function (t) {
this.hoverable = this.hoverable.add(t), this._on(t, {
mouseenter: function (t) {
e(t.currentTarget).addClass("ui-state-hover")
},
mouseleave: function (t) {
e(t.currentTarget).removeClass("ui-state-hover")
}
})
},
_focusable: function (t) {
this.focusable = this.focusable.add(t), this._on(t, {
focusin: function (t) {
e(t.currentTarget).addClass("ui-state-focus")
},
focusout: function (t) {
e(t.currentTarget).removeClass("ui-state-focus")
}
})
},
_trigger: function (t, i, s) {
var n, a, r = this.options[t];
if (s = s || {}, i = e.Event(i), i.type = (t === this.widgetEventPrefix ? t : this.widgetEventPrefix + t).toLowerCase(), i.target = this.element[0], a = i.originalEvent)
for (n in a) n in i || (i[n] = a[n]);
return this.element.trigger(i, s), !(e.isFunction(r) && r.apply(this.element[0], [i].concat(s)) === !1 || i.isDefaultPrevented())
}
}, e.each({
show: "fadeIn",
hide: "fadeOut"
}, function (t, i) {
e.Widget.prototype["_" + t] = function (s, n, a) {
"string" == typeof n && (n = {
effect: n
});
var r, o = n ? n === !0 || "number" == typeof n ? i : n.effect || i : t;
n = n || {}, "number" == typeof n && (n = {
duration: n
}), r = !e.isEmptyObject(n), n.complete = a, n.delay && s.delay(n.delay), r && e.effects && e.effects.effect[o] ? s[t](n) : o !== t && s[o] ? s[o](n.duration, n.easing, a) : s.queue(function (i) {
e(this)[t](), a && a.call(s[0]), i()
})
}
})
})(jQuery);
/*
By Osvaldas Valutis, www.osvaldas.info
Available for use under the MIT License
*/
/*global jQuery, window, document, console*/
/*jslint nomen:true, plusplus:true*/
/*
Original Plugin by Osvaldas Valutis, www.osvaldas.info
http://osvaldas.info/drop-down-navigation-responsive-and-touch-friendly
Available for use under the MIT License
*/
/**
* jquery-doubleTapToGo widget
* Copyright 2014 DACHCOM.DIGITAL AG
* @author Marco Rieser
* @see https://github.com/dachcom-digital/jquery-doubleTapToGo
*/
(function (e) { "use strict"; e.widget("dcd.doubleTapToGo", { options: { levels: 1 }, _create: function () { if (window.ontouchstart === undefined && !window.navigator.msMaxTouchPoints && !window.navigator.userAgent.toLowerCase().match(/windows phone os 7/i)) { return false } if (this.options.levels !== -1) { this._levelLimiter() } this._curItem = false; this._on({ "click li": "_checkFirstClick" }); this._on(document, { "click touchstart MSPointerDown": "_openNavigation" }); return true }, _levelLimiter: function () { var e = 0, t = ""; for (e; e < this.options.levels; e++) { t += "> ul > li " } t += "ul"; this.element.find(t).addClass("no-doubletapping") }, _checkFirstClick: function (t) { var n = e(t.target).closest("li"); if (!n.find("ul").length) { return } if (n.parent("ul").hasClass("no-doubletapping")) { return } if (n[0] !== this._curItem[0]) { t.preventDefault(); this._curItem = n } }, _openNavigation: function (t) { var n = true, r = e(t.target).parents(), i = 0; for (i; i < r.length; i++) { if (r[i] === this._curItem[0]) { n = false } } if (n) { this._curItem = false } } }) })(jQuery)
jQuery(function () {
// Prevents page change on initial tap on mobile device
try {
jQuery('.menu').doubleTapToGo({
levels: -1
});
} catch(e) {
}
function highlightActivePage() {
var trimmed = breadCrumb.substring(1, breadCrumb.length - 1);
var catIds = trimmed.split("||");
var vnav = jQuery('.vnav');
for (var i = 0; i < catIds.length; i++) {
vnav.find('a[href*="/' + catIds[i] + '.htm"]').addClass('vnav__link--active');
vnav.find('a[href*="/SearchResults.asp?Cat=' + catIds[i] + '"]').addClass('vnav__link--active');
}
}
if (typeof breadCrumb != 'undefined' && breadCrumb != "||") {
highlightActivePage()
}
});
/*
Republishing Oct 10, 2019
*/