/*
(function(a) {
window.cookiePolicy = (function() {
! function(f, h) {
var g = function() {
return g.get.apply(g, arguments)
};
g.utils = utils = {
isArray: Array.isArray || function(j) {
return Object.prototype.toString.call(j) === "[object Array]"
},
isPlainObject: function(j) {
return !!j && Object.prototype.toString.call(j) === "[object Object]"
},
toArray: function(j) {
return Array.prototype.slice.call(j)
},
getKeys: Object.keys || function(j) {
var l = [],
k = "";
for (k in j) {
j.hasOwnProperty(k) && l.push(k)
}
return l
},
escape: function(j) {
return String(j).replace(/[,;"\\=\s%]/g, function(k) {
return encodeURIComponent(k)
})
},
retrieve: function(j, k) {
return j == null ? k : j
}
}, g.defaults = {}, g.expiresMultiplier = 86400, g.set = function(q, v, m) {
if (utils.isPlainObject(q)) {
for (var w in q) {
q.hasOwnProperty(w) && this.set(w, q[w], v)
}
} else {
m = utils.isPlainObject(m) ? m : {
expires: m
};
var t = m.expires !== h ? m.expires : this.defaults.expires || "",
x = typeof t;
x === "string" && t !== "" ? t = new Date(t) : x === "number" && (t = new Date(+(new Date) + 1000 * this.expiresMultiplier * t)), t !== "" && "toGMTString" in t && (t = ";expires=" + t.toGMTString());
var j = this.defaults.path;
j = ";path=/";
var k = m.domain || this.defaults.domain;
k = k ? ";domain=" + k : "";
var p = m.secure || this.defaults.secure ? ";secure" : "";
f.cookie = utils.escape(q) + "=" + utils.escape(v) + t + j + k + p
}
return this
}, g.remove = function(j) {
j = utils.isArray(j) ? j : utils.toArray(arguments);
for (var l = 0, k = j.length; l < k; l++) {
this.set(j[l], "", -1)
}
return this
}, g.empty = function() {
return this.remove(utils.getKeys(this.all()))
}, g.get = function(j, l) {
l = l || h;
var p = this.all();
if (utils.isArray(j)) {
var k = {};
for (var q = 0, m = j.length; q < m; q++) {
var t = j[q];
k[t] = utils.retrieve(p[t], l)
}
return k
}
return utils.retrieve(p[j], l)
}, g.all = function() {
if (f.cookie === "") {
return {}
}
var o = f.cookie.split("; "),
k = {};
for (var l = 0, j = o.length; l < j; l++) {
var m = o[l].split("=");
k[decodeURIComponent(m[0])] = decodeURIComponent(m[1])
}
return k
}, g.enabled = function() {
if (navigator.cookieEnabled) {
return !0
}
var j = g.set("_", "_").get("_") === "_";
return g.remove("_"), j
}, typeof define == "function" && define.amd ? define(function() {
return g
}) : typeof exports != "undefined" ? exports.cookie = g : window.cookie = g
}(document);
function e() {
b();
a(".cookie-alert .cookie-close").on("click", function(f) {
f.preventDefault();
c()
})
}
function b() {
if (cookie.get("cookie-alert") !== "true") {
d()
}
}
function d() {
setTimeout(function() {
a(".cookie-alert").addClass("show")
}, 1000)
}
function c() {
a(".cookie-alert").removeClass("show");
cookie.set("cookie-alert", "true")
}
return {
init: e,
close: c
}
})();
a(document).ready(function() {
cookiePolicy.init()
})
})(jQuery);
if ((cookie.get("WhiteLBLCookie"))) {
$("#divCookiclose").remove()
} else {
$("#divCookiclose").removeClass("hide-cookie");
$("#btnCookieClose").click(function() {
cookie.set("WhiteLBLCookie", "true", 180);
$("#divCookiclose").remove()
})
}
$(document).ready(function() {
$(".sub-child-list").each(function() {
if ($(this).children().length < 1) {
$(this).closest("li.hasChildren").removeClass("hasChildren")
}
});
$(".child-list").each(function() {
if ($(this).children().length < 1) {
$(this).closest("li.hasChildren").removeClass("hasChildren")
}
});
$(".lastItemParent").each(function() {
if ($(this).next("ul.sub-child-list").children().length < 1) {
var a = $(this).find("span.lastItem").text();
$(this).find("span.lastItem").parent().remove();
$(this).html(a)
}
})
});
*/
/* jQuery Validation Plugin - v1.11.0 - 2/4/2013
* https://github.com/jzaefferer/jquery-validation
* Copyright (c) 2013 Jörn Zaefferer; Licensed MIT */
(function(a) {
a.extend(a.fn, {
validate: function(c) {
if (!this.length) {
c && c.debug && window.console && console.warn("Nothing selected, can't validate, returning nothing.");
return
}
var b = a.data(this[0], "validator");
return b ? b : (this.attr("novalidate", "novalidate"), b = new a.validator(c, this[0]), a.data(this[0], "validator", b), b.settings.onsubmit && (this.validateDelegate(":submit", "click", function(d) {
b.settings.submitHandler && (b.submitButton = d.target), a(d.target).hasClass("cancel") && (b.cancelSubmit = !0)
}), this.submit(function(e) {
function d() {
var f;
return b.settings.submitHandler ? (b.submitButton && (f = a("").attr("name", b.submitButton.name).val(b.submitButton.value).appendTo(b.currentForm)), b.settings.submitHandler.call(b, b.currentForm, e), b.submitButton && f.remove(), !1) : !0
}
return b.settings.debug && e.preventDefault(), b.cancelSubmit ? (b.cancelSubmit = !1, d()) : b.form() ? b.pendingRequest ? (b.formSubmitted = !0, !1) : d() : (b.focusInvalid(), !1)
})), b)
},
valid: function() {
if (a(this[0]).is("form")) {
return this.validate().form()
}
var c = !0,
b = a(this[0].form).validate();
return this.each(function() {
c &= b.element(this)
}), c
},
removeAttrs: function(d) {
var b = {},
c = this;
return a.each(d.split(/\s/), function(f, g) {
b[g] = c.attr(g), c.removeAttr(g)
}), b
},
rules: function(k, e) {
var h = this[0];
if (k) {
var d = a.data(h.form, "validator").settings,
j = d.rules,
g = a.validator.staticRules(h);
switch (k) {
case "add":
a.extend(g, a.validator.normalizeRule(e)), j[h.name] = g, e.messages && (d.messages[h.name] = a.extend(d.messages[h.name], e.messages));
break;
case "remove":
if (!e) {
return delete j[h.name], g
}
var l = {};
return a.each(e.split(/\s/), function(f, m) {
l[m] = g[m], delete g[m]
}), l
}
}
var b = a.validator.normalizeRules(a.extend({}, a.validator.classRules(h), a.validator.attributeRules(h), a.validator.dataRules(h), a.validator.staticRules(h)), h);
if (b.required) {
var c = b.required;
delete b.required, b = a.extend({
required: c
}, b)
}
return b
}
}), a.extend(a.expr[":"], {
blank: function(b) {
return !a.trim("" + b.value)
},
filled: function(b) {
return !!a.trim("" + b.value)
},
unchecked: function(b) {
return !b.checked
}
}), a.validator = function(c, b) {
this.settings = a.extend(!0, {}, a.validator.defaults, c), this.currentForm = b, this.init()
}, a.validator.format = function(c, b) {
return arguments.length === 1 ? function() {
var d = a.makeArray(arguments);
return d.unshift(c), a.validator.format.apply(this, d)
} : (arguments.length > 2 && b.constructor !== Array && (b = a.makeArray(arguments).slice(1)), b.constructor !== Array && (b = [b]), a.each(b, function(d, f) {
c = c.replace(new RegExp("\\{" + d + "\\}", "g"), function() {
return f
})
}), c)
}, a.extend(a.validator, {
defaults: {
messages: {},
groups: {},
rules: {},
errorClass: "error",
validClass: "valid",
errorElement: "label",
focusInvalid: !0,
errorContainer: a([]),
errorLabelContainer: a([]),
onsubmit: !0,
ignore: ":hidden",
ignoreTitle: !1,
onfocusin: function(b, c) {
this.lastActive = b, this.settings.focusCleanup && !this.blockFocusCleanup && (this.settings.unhighlight && this.settings.unhighlight.call(this, b, this.settings.errorClass, this.settings.validClass), this.addWrapper(this.errorsFor(b)).hide())
},
onfocusout: function(b, c) {
!this.checkable(b) && (b.name in this.submitted || !this.optional(b)) && this.element(b)
},
onkeyup: function(b, c) {
if (c.which === 9 && this.elementValue(b) === "") {
return
}(b.name in this.submitted || b === this.lastElement) && this.element(b)
},
onclick: function(b, c) {
b.name in this.submitted ? this.element(b) : b.parentNode.name in this.submitted && this.element(b.parentNode)
},
highlight: function(d, b, c) {
d.type === "radio" ? this.findByName(d.name).addClass(b).removeClass(c) : a(d).addClass(b).removeClass(c)
},
unhighlight: function(d, b, c) {
d.type === "radio" ? this.findByName(d.name).removeClass(b).addClass(c) : a(d).removeClass(b).addClass(c)
}
},
setDefaults: function(b) {
a.extend(a.validator.defaults, b)
},
messages: {
required: "This field is required.",
remote: "Please fix this field.",
email: "Please enter a valid email address.",
url: "Please enter a valid URL.",
date: "Please enter a valid date.",
dateISO: "Please enter a valid date (ISO).",
number: "Please enter a valid number.",
digits: "Please enter only digits.",
creditcard: "Please enter a valid credit card number.",
equalTo: "Please enter the same value again.",
maxlength: a.validator.format("Please enter no more than {0} characters."),
minlength: a.validator.format("Please enter at least {0} characters."),
rangelength: a.validator.format("Please enter a value between {0} and {1} characters long."),
range: a.validator.format("Please enter a value between {0} and {1}."),
max: a.validator.format("Please enter a value less than or equal to {0}."),
min: a.validator.format("Please enter a value greater than or equal to {0}.")
},
autoCreateRanges: !1,
prototype: {
init: function() {
function c(g) {
var e = a.data(this[0].form, "validator"),
f = "on" + g.type.replace(/^validate/, "");
e.settings[f] && e.settings[f].call(e, this[0], g)
}
this.labelContainer = a(this.settings.errorLabelContainer), this.errorContext = this.labelContainer.length && this.labelContainer || a(this.currentForm), this.containers = a(this.settings.errorContainer).add(this.settings.errorLabelContainer), this.submitted = {}, this.valueCache = {}, this.pendingRequest = 0, this.pending = {}, this.invalid = {}, this.reset();
var d = this.groups = {};
a.each(this.settings.groups, function(e, f) {
typeof f == "string" && (f = f.split(/\s/)), a.each(f, function(g, h) {
d[h] = e
})
});
var b = this.settings.rules;
a.each(b, function(f, e) {
b[f] = a.validator.normalizeRule(e)
}), a(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ", "focusin focusout keyup", c).validateDelegate("[type='radio'], [type='checkbox'], select, option", "click", c), this.settings.invalidHandler && a(this.currentForm).bind("invalid-form.validate", this.settings.invalidHandler)
},
form: function() {
return this.checkForm(), a.extend(this.submitted, this.errorMap), this.invalid = a.extend({}, this.errorMap), this.valid() || a(this.currentForm).triggerHandler("invalid-form", [this]), this.showErrors(), this.valid()
},
checkForm: function() {
this.prepareForm();
for (var b = 0, c = this.currentElements = this.elements(); c[b]; b++) {
this.check(c[b])
}
return this.valid()
},
element: function(c) {
c = this.validationTargetFor(this.clean(c)), this.lastElement = c, this.prepareElement(c), this.currentElements = a(c);
var b = this.check(c) !== !1;
return b ? delete this.invalid[c.name] : this.invalid[c.name] = !0, this.numberOfInvalids() || (this.toHide = this.toHide.add(this.containers)), this.showErrors(), b
},
showErrors: function(c) {
if (c) {
a.extend(this.errorMap, c), this.errorList = [];
for (var b in c) {
this.errorList.push({
message: c[b],
element: this.findByName(b)[0]
})
}
this.successList = a.grep(this.successList, function(d) {
return !(d.name in c)
})
}
this.settings.showErrors ? this.settings.showErrors.call(this, this.errorMap, this.errorList) : this.defaultShowErrors()
},
resetForm: function() {
a.fn.resetForm && a(this.currentForm).resetForm(), this.submitted = {}, this.lastElement = null, this.prepareForm(), this.hideErrors(), this.elements().removeClass(this.settings.errorClass).removeData("previousValue")
},
numberOfInvalids: function() {
return this.objectLength(this.invalid)
},
objectLength: function(b) {
var d = 0;
for (var c in b) {
d++
}
return d
},
hideErrors: function() {
this.addWrapper(this.toHide).hide()
},
valid: function() {
return this.size() === 0
},
size: function() {
return this.errorList.length
},
focusInvalid: function() {
if (this.settings.focusInvalid) {
try {
a(this.findLastActive() || this.errorList.length && this.errorList[0].element || []).filter(":visible").focus().trigger("focusin")
} catch (b) {}
}
},
findLastActive: function() {
var b = this.lastActive;
return b && a.grep(this.errorList, function(c) {
return c.element.name === b.name
}).length === 1 && b
},
elements: function() {
var c = this,
b = {};
return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function() {
return !this.name && c.settings.debug && window.console && console.error("%o has no name assigned", this), this.name in b || !c.objectLength(a(this).rules()) ? !1 : (b[this.name] = !0, !0)
})
},
clean: function(b) {
return a(b)[0]
},
errors: function() {
var b = this.settings.errorClass.replace(" ", ".");
return a(this.settings.errorElement + "." + b, this.errorContext)
},
reset: function() {
this.successList = [], this.errorList = [], this.errorMap = {}, this.toShow = a([]), this.toHide = a([]), this.currentElements = a([])
},
prepareForm: function() {
this.reset(), this.toHide = this.errors().add(this.containers)
},
prepareElement: function(b) {
this.reset(), this.toHide = this.errorsFor(b)
},
elementValue: function(d) {
var b = a(d).attr("type"),
c = a(d).val();
return b === "radio" || b === "checkbox" ? a("input[name='" + a(d).attr("name") + "']:checked").val() : typeof c == "string" ? c.replace(/\r/g, "") : c
},
check: function(h) {
h = this.validationTargetFor(this.clean(h));
var d = a(h).rules(),
f = !1,
c = this.elementValue(h),
g;
for (var e in d) {
var j = {
method: e,
parameters: d[e]
};
try {
g = a.validator.methods[e].call(this, c, h, j.parameters);
if (g === "dependency-mismatch") {
f = !0;
continue
}
f = !1;
if (g === "pending") {
this.toHide = this.toHide.not(this.errorsFor(h));
return
}
if (!g) {
return this.formatAndAdd(h, j), !1
}
} catch (b) {
throw this.settings.debug && window.console && console.log("Exception occured when checking element " + h.id + ", check the '" + j.method + "' method.", b), b
}
}
if (f) {
return
}
return this.objectLength(d) && this.successList.push(h), !0
},
customDataMessage: function(c, b) {
return a(c).data("msg-" + b.toLowerCase()) || c.attributes && a(c).attr("data-msg-" + b.toLowerCase())
},
customMessage: function(b, d) {
var c = this.settings.messages[b];
return c && (c.constructor === String ? c : c[d])
},
findDefined: function() {
for (var b = 0; b < arguments.length; b++) {
if (arguments[b] !== undefined) {
return arguments[b]
}
}
return undefined
},
defaultMessage: function(c, b) {
return this.findDefined(this.customMessage(c.name, b), this.customDataMessage(c, b), !this.settings.ignoreTitle && c.title || undefined, a.validator.messages[b], "Warning: No message defined for " + c.name + "")
},
formatAndAdd: function(e, c) {
var d = this.defaultMessage(e, c.method),
b = /\$?\{(\d+)\}/g;
typeof d == "function" ? d = d.call(this, c.parameters, e) : b.test(d) && (d = a.validator.format(d.replace(b, "{$1}"), c.parameters)), this.errorList.push({
message: d,
element: e
}), this.errorMap[e.name] = d, this.submitted[e.name] = d
},
addWrapper: function(b) {
return this.settings.wrapper && (b = b.add(b.parent(this.settings.wrapper))), b
},
defaultShowErrors: function() {
var b, d;
for (b = 0; this.errorList[b]; b++) {
var c = this.errorList[b];
this.settings.highlight && this.settings.highlight.call(this, c.element, this.settings.errorClass, this.settings.validClass), this.showLabel(c.element, c.message)
}
this.errorList.length && (this.toShow = this.toShow.add(this.containers));
if (this.settings.success) {
for (b = 0; this.successList[b]; b++) {
this.showLabel(this.successList[b])
}
}
if (this.settings.unhighlight) {
for (b = 0, d = this.validElements(); d[b]; b++) {
this.settings.unhighlight.call(this, d[b], this.settings.errorClass, this.settings.validClass)
}
}
this.toHide = this.toHide.not(this.toShow), this.hideErrors(), this.addWrapper(this.toShow).show()
},
validElements: function() {
return this.currentElements.not(this.invalidElements())
},
invalidElements: function() {
return a(this.errorList).map(function() {
return this.element
})
},
showLabel: function(d, b) {
var c = this.errorsFor(d);
c.length ? (c.removeClass(this.settings.validClass).addClass(this.settings.errorClass), c.html(b)) : (c = a("<" + this.settings.errorElement + ">").attr("for", this.idOrName(d)).addClass(this.settings.errorClass).html(b || ""), this.settings.wrapper && (c = c.hide().show().wrap("<" + this.settings.wrapper + "/>").parent()), this.labelContainer.append(c).length || (this.settings.errorPlacement ? this.settings.errorPlacement(c, a(d)) : c.insertAfter(d))), !b && this.settings.success && (c.text(""), typeof this.settings.success == "string" ? c.addClass(this.settings.success) : this.settings.success(c, d)), this.toShow = this.toShow.add(c)
},
errorsFor: function(c) {
var b = this.idOrName(c);
return this.errors().filter(function() {
return a(this).attr("for") === b
})
},
idOrName: function(b) {
return this.groups[b.name] || (this.checkable(b) ? b.name : b.id || b.name)
},
validationTargetFor: function(b) {
return this.checkable(b) && (b = this.findByName(b.name).not(this.settings.ignore)[0]), b
},
checkable: function(b) {
return /radio|checkbox/i.test(b.type)
},
findByName: function(b) {
return a(this.currentForm).find("[name='" + b + "']")
},
getLength: function(c, b) {
switch (b.nodeName.toLowerCase()) {
case "select":
return a("option:selected", b).length;
case "input":
if (this.checkable(b)) {
return this.findByName(b.name).filter(":checked").length
}
}
return c.length
},
depend: function(b, c) {
return this.dependTypes[typeof b] ? this.dependTypes[typeof b](b, c) : !0
},
dependTypes: {
"boolean": function(b, c) {
return b
},
string: function(c, b) {
return !!a(c, b.form).length
},
"function": function(b, c) {
return b(c)
}
},
optional: function(c) {
var b = this.elementValue(c);
return !a.validator.methods.required.call(this, b, c) && "dependency-mismatch"
},
startRequest: function(b) {
this.pending[b.name] || (this.pendingRequest++, this.pending[b.name] = !0)
},
stopRequest: function(c, b) {
this.pendingRequest--, this.pendingRequest < 0 && (this.pendingRequest = 0), delete this.pending[c.name], b && this.pendingRequest === 0 && this.formSubmitted && this.form() ? (a(this.currentForm).submit(), this.formSubmitted = !1) : !b && this.pendingRequest === 0 && this.formSubmitted && (a(this.currentForm).triggerHandler("invalid-form", [this]), this.formSubmitted = !1)
},
previousValue: function(b) {
return a.data(b, "previousValue") || a.data(b, "previousValue", {
old: null,
valid: !0,
message: this.defaultMessage(b, "remote")
})
}
},
classRuleSettings: {
required: {
required: !0
},
email: {
email: !0
},
url: {
url: !0
},
date: {
date: !0
},
dateISO: {
dateISO: !0
},
number: {
number: !0
},
digits: {
digits: !0
},
creditcard: {
creditcard: !0
}
},
addClassRules: function(c, b) {
c.constructor === String ? this.classRuleSettings[c] = b : a.extend(this.classRuleSettings, c)
},
classRules: function(d) {
var b = {},
c = a(d).attr("class");
return c && a.each(c.split(" "), function() {
this in a.validator.classRuleSettings && a.extend(b, a.validator.classRuleSettings[this])
}), b
},
attributeRules: function(f) {
var c = {},
d = a(f);
for (var b in a.validator.methods) {
var e;
b === "required" ? (e = d.get(0).getAttribute(b), e === "" && (e = !0), e = !!e) : e = d.attr(b), e ? c[b] = e : d[0].getAttribute("type") === b && (c[b] = !0)
}
return c.maxlength && /-1|2147483647|524288/.test(c.maxlength) && delete c.maxlength, c
},
dataRules: function(f) {
var c, d, b = {},
e = a(f);
for (c in a.validator.methods) {
d = e.data("rule-" + c.toLowerCase()), d !== undefined && (b[c] = d)
}
return b
},
staticRules: function(d) {
var b = {},
c = a.data(d.form, "validator");
return c.settings.rules && (b = a.validator.normalizeRule(c.settings.rules[d.name]) || {}), b
},
normalizeRules: function(c, b) {
return a.each(c, function(e, d) {
if (d === !1) {
delete c[e];
return
}
if (d.param || d.depends) {
var f = !0;
switch (typeof d.depends) {
case "string":
f = !!a(d.depends, b.form).length;
break;
case "function":
f = d.depends.call(b, b)
}
f ? c[e] = d.param !== undefined ? d.param : !0 : delete c[e]
}
}), a.each(c, function(e, d) {
c[e] = a.isFunction(d) ? d(b) : d
}), a.each(["minlength", "maxlength"], function() {
c[this] && (c[this] = Number(c[this]))
}), a.each(["rangelength"], function() {
var d;
c[this] && (a.isArray(c[this]) ? c[this] = [Number(c[this][0]), Number(c[this][1])] : typeof c[this] == "string" && (d = c[this].split(/[\s,]+/), c[this] = [Number(d[0]), Number(d[1])]))
}), a.validator.autoCreateRanges && (c.min && c.max && (c.range = [c.min, c.max], delete c.min, delete c.max), c.minlength && c.maxlength && (c.rangelength = [c.minlength, c.maxlength], delete c.minlength, delete c.maxlength)), c
},
normalizeRule: function(c) {
if (typeof c == "string") {
var b = {};
a.each(c.split(/\s/), function() {
b[this] = !0
}), c = b
}
return c
},
addMethod: function(d, b, c) {
a.validator.methods[d] = b, a.validator.messages[d] = c !== undefined ? c : a.validator.messages[d], b.length < 3 && a.validator.addClassRules(d, a.validator.normalizeRule(d))
},
methods: {
required: function(e, c, d) {
if (!this.depend(d, c)) {
return "dependency-mismatch"
}
if (c.nodeName.toLowerCase() === "select") {
var b = a(c).val();
return b && b.length > 0
}
return this.checkable(c) ? this.getLength(e, c) > 0 : a.trim(e).length > 0
},
remote: function(g, c, e) {
if (this.optional(c)) {
return "dependency-mismatch"
}
var b = this.previousValue(c);
this.settings.messages[c.name] || (this.settings.messages[c.name] = {}), b.originalMessage = this.settings.messages[c.name].remote, this.settings.messages[c.name].remote = b.message, e = typeof e == "string" && {
url: e
} || e;
if (b.old === g) {
return b.valid
}
b.old = g;
var f = this;
this.startRequest(c);
var d = {};
return d[c.name] = g, a.ajax(a.extend(!0, {
url: e,
mode: "abort",
port: "validate" + c.name,
dataType: "json",
data: d,
success: function(l) {
f.settings.messages[c.name].remote = b.originalMessage;
var k = l === !0 || l === "true";
if (k) {
var m = f.formSubmitted;
f.prepareElement(c), f.formSubmitted = m, f.successList.push(c), delete f.invalid[c.name], f.showErrors()
} else {
var h = {},
j = l || f.defaultMessage(c, "remote");
h[c.name] = b.message = a.isFunction(j) ? j(g) : j, f.invalid[c.name] = !0, f.showErrors(h)
}
b.valid = k, f.stopRequest(c, k)
}
}, e)), "pending"
},
minlength: function(e, c, d) {
var b = a.isArray(e) ? e.length : this.getLength(a.trim(e), c);
return this.optional(c) || b >= d
},
maxlength: function(e, c, d) {
var b = a.isArray(e) ? e.length : this.getLength(a.trim(e), c);
return this.optional(c) || b <= d
},
rangelength: function(e, c, d) {
var b = a.isArray(e) ? e.length : this.getLength(a.trim(e), c);
return this.optional(c) || b >= d[0] && b <= d[1]
},
min: function(b, d, c) {
return this.optional(d) || b >= c
},
max: function(b, d, c) {
return this.optional(d) || b <= c
},
range: function(b, d, c) {
return this.optional(d) || b >= c[0] && b <= c[1]
},
email: function(b, c) {
return this.optional(c) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(b)
},
url: function(b, c) {
return this.optional(c) || /^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(b)
},
date: function(b, c) {
return this.optional(c) || !/Invalid|NaN/.test((new Date(b)).toString())
},
dateISO: function(b, c) {
return this.optional(c) || /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(b)
},
number: function(b, c) {
return this.optional(c) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(b)
},
digits: function(b, c) {
return this.optional(c) || /^\d+$/.test(b)
},
creditcard: function(b, j) {
if (this.optional(j)) {
return "dependency-mismatch"
}
if (/[^0-9 \-]+/.test(b)) {
return !1
}
var d = 0,
g = 0,
c = !1;
b = b.replace(/\D/g, "");
for (var h = b.length - 1; h >= 0; h--) {
var f = b.charAt(h);
g = parseInt(f, 10), c && (g *= 2) > 9 && (g -= 9), d += g, c = !c
}
return d % 10 === 0
},
equalTo: function(e, c, d) {
var b = a(d);
return this.settings.onfocusout && b.unbind(".validate-equalTo").bind("blur.validate-equalTo", function() {
a(c).valid()
}), e === b.val()
}
}
}), a.format = a.validator.format
})(jQuery),
function(a) {
var c = {};
if (a.ajaxPrefilter) {
a.ajaxPrefilter(function(d, g, h) {
var f = d.port;
d.mode === "abort" && (c[f] && c[f].abort(), c[f] = h)
})
} else {
var b = a.ajax;
a.ajax = function(e) {
var d = ("mode" in e ? e : a.ajaxSettings).mode,
f = ("port" in e ? e : a.ajaxSettings).port;
return d === "abort" ? (c[f] && c[f].abort(), c[f] = b.apply(this, arguments)) : b.apply(this, arguments)
}
}
}(jQuery),
function(a) {
a.extend(a.fn, {
validateDelegate: function(d, b, c) {
return this.bind(b, function(f) {
var e = a(f.target);
if (e.is(d)) {
return c.apply(e, arguments)
}
})
}
})
}(jQuery);
/*
** Unobtrusive validation support library for jQuery and jQuery Validate
** Copyright (C) Microsoft Corporation. All rights reserved.
*/
(function(a) {
var b = a.validator,
c, e = "unobtrusiveValidation";
function m(p, q, r) {
p.rules[q] = r;
if (p.message) {
p.messages[q] = p.message
}
}
function n(p) {
return p.replace(/^\s+|\s+$/g, "").split(/\s*,\s*/g)
}
function f(p) {
return p.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g, "\\$1")
}
function g(p) {
return p.substr(0, p.lastIndexOf(".") + 1)
}
function d(q, p) {
if (q.indexOf("*.") === 0) {
q = q.replace("*.", p)
}
return q
}
function h(q, r) {
var p = a(this).find("[data-valmsg-for='" + f(r[0].name) + "']"),
t = p.attr("data-valmsg-replace"),
s = t ? a.parseJSON(t) !== false : null;
p.removeClass("field-validation-valid").addClass("field-validation-error");
q.data("unobtrusiveContainer", p);
if (s) {
p.empty();
q.removeClass("input-validation-error").appendTo(p)
} else {
q.hide()
}
}
function j(q, s) {
var p = a(this).find("[data-valmsg-summary=true]"),
r = p.find("ul");
if (r && r.length && s.errorList.length) {
r.empty();
p.addClass("validation-summary-errors").removeClass("validation-summary-valid");
a.each(s.errorList, function() {
a("
").html(this.message).appendTo(r)
})
}
}
function l(q) {
var p = q.data("unobtrusiveContainer"),
s = p.attr("data-valmsg-replace"),
r = s ? a.parseJSON(s) : null;
if (p) {
p.addClass("field-validation-valid").removeClass("field-validation-error");
q.removeData("unobtrusiveContainer");
if (r) {
p.empty()
}
}
}
function k(q) {
var p = a(this);
p.data("validator").resetForm();
p.find(".validation-summary-errors").addClass("validation-summary-valid").removeClass("validation-summary-errors");
p.find(".field-validation-error").addClass("field-validation-valid").removeClass("field-validation-error").removeData("unobtrusiveContainer").find(">*").removeData("unobtrusiveContainer")
}
function o(q) {
var p = a(q),
s = p.data(e),
r = a.proxy(k, q);
if (!s) {
s = {
options: {
errorClass: "input-validation-error",
errorElement: "span",
errorPlacement: a.proxy(h, q),
invalidHandler: a.proxy(j, q),
messages: {},
rules: {},
success: a.proxy(l, q)
},
attachValidation: function() {
p.unbind("reset." + e, r).bind("reset." + e, r).validate(this.options)
},
validate: function() {
p.validate();
return p.valid()
}
};
p.data(e, s)
}
return s
}
b.unobtrusive = {
adapters: [],
parseElement: function(q, u) {
var p = a(q),
r = p.parents("form")[0],
v, t, s;
if (!r) {
return
}
v = o(r);
v.options.rules[q.name] = t = {};
v.options.messages[q.name] = s = {};
a.each(this.adapters, function() {
var y = "data-val-" + this.name,
w = p.attr(y),
x = {};
if (w !== undefined) {
y += "-";
a.each(this.params, function() {
x[this] = p.attr(y + this)
});
this.adapt({
element: q,
form: r,
message: w,
params: x,
rules: t,
messages: s
})
}
});
a.extend(t, {
__dummy__: true
});
if (!u) {
v.attachValidation()
}
},
parse: function(q) {
var p = a(q).parents("form").andSelf().add(a(q).find("form")).filter("form");
a(q).find(":input[data-val=true]").each(function() {
b.unobtrusive.parseElement(this, true)
});
p.each(function() {
var r = o(this);
if (r) {
r.attachValidation()
}
})
}
};
c = b.unobtrusive.adapters;
c.add = function(p, r, q) {
if (!q) {
q = r;
r = []
}
this.push({
name: p,
params: r,
adapt: q
});
return this
};
c.addBool = function(p, q) {
return this.add(p, function(r) {
m(r, q || p, true)
})
};
c.addMinMax = function(p, u, r, t, s, q) {
return this.add(p, [s || "min", q || "max"], function(x) {
var w = x.params.min,
v = x.params.max;
if (w && v) {
m(x, t, [w, v])
} else {
if (w) {
m(x, u, w)
} else {
if (v) {
m(x, r, v)
}
}
}
})
};
c.addSingleVal = function(p, q, r) {
return this.add(p, [q || "val"], function(s) {
m(s, r || p, s.params[q])
})
};
b.addMethod("__dummy__", function(r, p, q) {
return true
});
b.addMethod("regex", function(s, p, r) {
var q;
if (this.optional(p)) {
return true
}
q = new RegExp(r).exec(s);
return (q && (q.index === 0) && (q[0].length === s.length))
});
b.addMethod("nonalphamin", function(s, p, r) {
var q;
if (r) {
q = s.match(/\W/g);
q = q && q.length >= r
}
return q
});
c.addSingleVal("accept", "exts").addSingleVal("regex", "pattern");
c.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url");
c.addMinMax("length", "minlength", "maxlength", "rangelength").addMinMax("range", "min", "max", "range");
c.add("equalto", ["other"], function(r) {
var t = g(r.element.name),
s = r.params.other,
q = d(s, t),
p = a(r.form).find(":input[name='" + f(q) + "']")[0];
m(r, "equalTo", p)
});
c.add("required", function(p) {
if (p.element.tagName.toUpperCase() !== "INPUT" || p.element.type.toUpperCase() !== "CHECKBOX") {
m(p, "required", true)
}
});
c.add("remote", ["url", "type", "additionalfields"], function(p) {
var r = {
url: p.params.url,
type: p.params.type || "GET",
data: {}
},
q = g(p.element.name);
a.each(n(p.params.additionalfields || p.element.name), function(t, s) {
var u = d(s, q);
r.data[u] = function() {
return a(p.form).find(":input[name='" + f(u) + "']").val()
}
});
m(p, "remote", r)
});
c.add("password", ["min", "nonalphamin", "regex"], function(p) {
if (p.params.min) {
m(p, "minlength", p.params.min)
}
if (p.params.nonalphamin) {
m(p, "nonalphamin", p.params.nonalphamin)
}
if (p.params.regex) {
m(p, "regex", p.params.regex)
}
});
a(function() {
b.unobtrusive.parse(document)
})
}(jQuery));
(function(a) {
var b = function(d, e) {
return d.find("[name='" + e + "']")
};
var c = function(d) {
return a(d).closest("form")
};
a.validator.addMethod("enforcetrue", function(f, d, e) {
return d.checked
});
a.validator.unobtrusive.adapters.addBool("enforcetrue");
a.validator.unobtrusive.adapters.add("atleastonerequired", ["properties"], function(d) {
d.rules.atleastonerequired = d.params;
d.messages.atleastonerequired = d.message
});
a.validator.addMethod("atleastonerequired", function(h, e, f) {
var d = c(e);
var g = f.properties.split(",");
var j = a.map(g, function(l, k) {
var m = b(d, l).val();
return m != "" ? m : null
});
return j.length > 0
}, "");
a.validator.unobtrusive.adapters.add("requiredor", ["otherproperties"], function(d) {
d.rules.requiredor = d.params;
d.messages.requiredor = d.message
});
a.validator.addMethod("requiredor", function(h, e, f) {
if (h != "") {
return true
}
var d = c(e);
var g = f.otherproperties.split(",");
var j = a.map(g, function(l, k) {
var m = b(d, l).val();
return m != "" ? m : null
});
return j.length > 0
}, "")
})(window.jQuery);
/*
* Bootstrap v3.1.1 (http://getbootstrap.com)
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
if ("undefined" == typeof jQuery) {
throw new Error("Bootstrap's JavaScript requires jQuery")
} + function(c) {
function d() {
var e = document.createElement("bootstrap"),
f = {
WebkitTransition: "webkitTransitionEnd",
MozTransition: "transitionend",
OTransition: "oTransitionEnd otransitionend",
transition: "transitionend"
};
for (var g in f) {
if (void 0 !== e.style[g]) {
return {
end: f[g]
}
}
}
return !1
}
c.fn.emulateTransitionEnd = function(a) {
var f = !1,
g = this;
c(this).one(c.support.transition.end, function() {
f = !0
});
var h = function() {
f || c(g).trigger(c.support.transition.end)
};
return setTimeout(h, a), this
}, c(function() {
c.support.transition = d()
})
}(jQuery), + function(e) {
var f = '[data-dismiss="alert"]',
g = function(a) {
e(a).on("click", f, this.close)
};
g.prototype.close = function(a) {
function j() {
m.trigger("closed.bs.alert").remove()
}
var k = e(this),
l = k.attr("data-target");
l || (l = k.attr("href"), l = l && l.replace(/.*(?=#[^\s]*$)/, ""));
var m = e(l);
a && a.preventDefault(), m.length || (m = k.hasClass("alert") ? k : k.parent()), m.trigger(a = e.Event("close.bs.alert")), a.isDefaultPrevented() || (m.removeClass("in"), e.support.transition && m.hasClass("fade") ? m.one(e.support.transition.end, j).emulateTransitionEnd(150) : j())
};
var h = e.fn.alert;
e.fn.alert = function(a) {
return this.each(function() {
var b = e(this),
c = b.data("bs.alert");
c || b.data("bs.alert", c = new g(this)), "string" == typeof a && c[a].call(b)
})
}, e.fn.alert.Constructor = g, e.fn.alert.noConflict = function() {
return e.fn.alert = h, this
}, e(document).on("click.bs.alert.data-api", f, g.prototype.close)
}(jQuery), + function(d) {
var e = function(a, b) {
this.$element = d(a), this.options = d.extend({}, e.DEFAULTS, b), this.isLoading = !1
};
e.DEFAULTS = {
loadingText: "loading..."
}, e.prototype.setState = function(a) {
var g = "disabled",
h = this.$element,
j = h.is("input") ? "val" : "html",
k = h.data();
a += "Text", k.resetText || h.data("resetText", h[j]()), h[j](k[a] || this.options[a]), setTimeout(d.proxy(function() {
"loadingText" == a ? (this.isLoading = !0, h.addClass(g).attr(g, g)) : this.isLoading && (this.isLoading = !1, h.removeClass(g).removeAttr(g))
}, this), 0)
}, e.prototype.toggle = function() {
var g = !0,
h = this.$element.closest('[data-toggle="buttons"]');
if (h.length) {
var j = this.$element.find("input");
"radio" == j.prop("type") && (j.prop("checked") && this.$element.hasClass("active") ? g = !1 : h.find(".active").removeClass("active")), g && j.prop("checked", !this.$element.hasClass("active")).trigger("change")
}
g && this.$element.toggleClass("active")
};
var f = d.fn.button;
d.fn.button = function(a) {
return this.each(function() {
var b = d(this),
c = b.data("bs.button"),
g = "object" == typeof a && a;
c || b.data("bs.button", c = new e(this, g)), "toggle" == a ? c.toggle() : a && c.setState(a)
})
}, d.fn.button.Constructor = e, d.fn.button.noConflict = function() {
return d.fn.button = f, this
}, d(document).on("click.bs.button.data-api", "[data-toggle^=button]", function(a) {
var g = d(a.target);
g.hasClass("btn") || (g = g.closest(".btn")), g.button("toggle"), a.preventDefault()
})
}(jQuery), + function(d) {
var e = function(a, g) {
this.$element = d(a), this.$indicators = this.$element.find(".carousel-indicators"), this.options = g, this.paused = this.sliding = this.interval = this.$active = this.$items = null, "hover" == this.options.pause && this.$element.on("mouseenter", d.proxy(this.pause, this)).on("mouseleave", d.proxy(this.cycle, this))
};
e.DEFAULTS = {
interval: 5000,
pause: "hover",
wrap: !0
}, e.prototype.cycle = function(a) {
return a || (this.paused = !1), this.interval && clearInterval(this.interval), this.options.interval && !this.paused && (this.interval = setInterval(d.proxy(this.next, this), this.options.interval)), this
}, e.prototype.getActiveIndex = function() {
return this.$active = this.$element.find(".item.active"), this.$items = this.$active.parent().children(), this.$items.index(this.$active)
}, e.prototype.to = function(a) {
var g = this,
h = this.getActiveIndex();
return a > this.$items.length - 1 || 0 > a ? void 0 : this.sliding ? this.$element.one("slid.bs.carousel", function() {
g.to(a)
}) : h == a ? this.pause().cycle() : this.slide(a > h ? "next" : "prev", d(this.$items[a]))
}, e.prototype.pause = function(a) {
return a || (this.paused = !0), this.$element.find(".next, .prev").length && d.support.transition && (this.$element.trigger(d.support.transition.end), this.cycle(!0)), this.interval = clearInterval(this.interval), this
}, e.prototype.next = function() {
return this.sliding ? void 0 : this.slide("next")
}, e.prototype.prev = function() {
return this.sliding ? void 0 : this.slide("prev")
}, e.prototype.slide = function(a, k) {
var l = this.$element.find(".item.active"),
m = k || l[a](),
n = this.interval,
o = "next" == a ? "left" : "right",
p = "next" == a ? "first" : "last",
q = this;
if (!m.length) {
if (!this.options.wrap) {
return
}
m = this.$element.find(".item")[p]()
}
if (m.hasClass("active")) {
return this.sliding = !1
}
var r = d.Event("slide.bs.carousel", {
relatedTarget: m[0],
direction: o
});
return this.$element.trigger(r), r.isDefaultPrevented() ? void 0 : (this.sliding = !0, n && this.pause(), this.$indicators.length && (this.$indicators.find(".active").removeClass("active"), this.$element.one("slid.bs.carousel", function() {
var c = d(q.$indicators.children()[q.getActiveIndex()]);
c && c.addClass("active")
})), d.support.transition && this.$element.hasClass("slide") ? (m.addClass(a), m[0].offsetWidth, l.addClass(o), m.addClass(o), l.one(d.support.transition.end, function() {
m.removeClass([a, o].join(" ")).addClass("active"), l.removeClass(["active", o].join(" ")), q.sliding = !1, setTimeout(function() {
q.$element.trigger("slid.bs.carousel")
}, 0)
}).emulateTransitionEnd(1000 * l.css("transition-duration").slice(0, -1))) : (l.removeClass("active"), m.addClass("active"), this.sliding = !1, this.$element.trigger("slid.bs.carousel")), n && this.cycle(), this)
};
var f = d.fn.carousel;
d.fn.carousel = function(a) {
return this.each(function() {
var b = d(this),
c = b.data("bs.carousel"),
h = d.extend({}, e.DEFAULTS, b.data(), "object" == typeof a && a),
j = "string" == typeof a ? a : h.slide;
c || b.data("bs.carousel", c = new e(this, h)), "number" == typeof a ? c.to(a) : j ? c[j]() : h.interval && c.pause().cycle()
})
}, d.fn.carousel.Constructor = e, d.fn.carousel.noConflict = function() {
return d.fn.carousel = f, this
}, d(document).on("click.bs.carousel.data-api", "[data-slide], [data-slide-to]", function(a) {
var h, j = d(this),
k = d(j.attr("data-target") || (h = j.attr("href")) && h.replace(/.*(?=#[^\s]+$)/, "")),
l = d.extend({}, k.data(), j.data()),
m = j.attr("data-slide-to");
m && (l.interval = !1), k.carousel(l), (m = j.attr("data-slide-to")) && k.data("bs.carousel").to(m), a.preventDefault()
}), d(window).on("load", function() {
d('[data-ride="carousel"]').each(function() {
var a = d(this);
a.carousel(a.data())
})
})
}(jQuery), + function(d) {
var e = function(a, b) {
this.$element = d(a), this.options = d.extend({}, e.DEFAULTS, b), this.transitioning = null, this.options.parent && (this.$parent = d(this.options.parent)), this.options.toggle && this.toggle()
};
e.DEFAULTS = {
toggle: !0
}, e.prototype.dimension = function() {
var b = this.$element.hasClass("width");
return b ? "width" : "height"
}, e.prototype.show = function() {
if (!this.transitioning && !this.$element.hasClass("in")) {
var a = d.Event("show.bs.collapse");
if (this.$element.trigger(a), !a.isDefaultPrevented()) {
var h = this.$parent && this.$parent.find("> .panel > .in");
if (h && h.length) {
var j = h.data("bs.collapse");
if (j && j.transitioning) {
return
}
h.collapse("hide"), j || h.data("bs.collapse", null)
}
var k = this.dimension();
this.$element.removeClass("collapse").addClass("collapsing")[k](0), this.transitioning = 1;
var l = function() {
this.$element.removeClass("collapsing").addClass("collapse in")[k]("auto"), this.transitioning = 0, this.$element.trigger("shown.bs.collapse")
};
if (!d.support.transition) {
return l.call(this)
}
var m = d.camelCase(["scroll", k].join("-"));
this.$element.one(d.support.transition.end, d.proxy(l, this)).emulateTransitionEnd(350)[k](this.$element[0][m])
}
}
}, e.prototype.hide = function() {
if (!this.transitioning && this.$element.hasClass("in")) {
var a = d.Event("hide.bs.collapse");
if (this.$element.trigger(a), !a.isDefaultPrevented()) {
var g = this.dimension();
this.$element[g](this.$element[g]())[0].offsetHeight, this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"), this.transitioning = 1;
var h = function() {
this.transitioning = 0, this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")
};
return d.support.transition ? void this.$element[g](0).one(d.support.transition.end, d.proxy(h, this)).emulateTransitionEnd(350) : h.call(this)
}
}
}, e.prototype.toggle = function() {
this[this.$element.hasClass("in") ? "hide" : "show"]()
};
var f = d.fn.collapse;
d.fn.collapse = function(a) {
return this.each(function() {
var b = d(this),
c = b.data("bs.collapse"),
g = d.extend({}, e.DEFAULTS, b.data(), "object" == typeof a && a);
!c && g.toggle && "show" == a && (a = !a), c || b.data("bs.collapse", c = new e(this, g)), "string" == typeof a && c[a]()
})
}, d.fn.collapse.Constructor = e, d.fn.collapse.noConflict = function() {
return d.fn.collapse = f, this
}, d(document).on("click.bs.collapse.data-api", "[data-toggle=collapse]", function(a) {
var k, l = d(this),
m = l.attr("data-target") || a.preventDefault() || (k = l.attr("href")) && k.replace(/.*(?=#[^\s]+$)/, ""),
n = d(m),
o = n.data("bs.collapse"),
p = o ? "toggle" : l.data(),
q = l.attr("data-parent"),
r = q && d(q);
o && o.transitioning || (r && r.find('[data-toggle=collapse][data-parent="' + q + '"]').not(l).addClass("collapsed"), l[n.hasClass("in") ? "addClass" : "removeClass"]("collapsed")), n.collapse(p)
})
}(jQuery), + function(h) {
function j(a) {
h(l).remove(), h(m).each(function() {
var b = k(h(this)),
c = {
relatedTarget: this
};
b.hasClass("open") && (b.trigger(a = h.Event("hide.bs.dropdown", c)), a.isDefaultPrevented() || b.removeClass("open").trigger("hidden.bs.dropdown", c))
})
}
function k(a) {
var e = a.attr("data-target");
e || (e = a.attr("href"), e = e && /#[A-Za-z]/.test(e) && e.replace(/.*(?=#[^\s]*$)/, ""));
var f = e && h(e);
return f && f.length ? f : a.parent()
}
var l = ".dropdown-backdrop",
m = "[data-toggle=dropdown]",
n = function(a) {
h(a).on("click.bs.dropdown", this.toggle)
};
n.prototype.toggle = function(a) {
var b = h(this);
if (!b.is(".disabled, :disabled")) {
var c = k(b),
p = c.hasClass("open");
if (j(), !p) {
"ontouchstart" in document.documentElement && !c.closest(".navbar-nav").length && h('').insertAfter(h(this)).on("click", j);
var q = {
relatedTarget: this
};
if (c.trigger(a = h.Event("show.bs.dropdown", q)), a.isDefaultPrevented()) {
return
}
c.toggleClass("open").trigger("shown.bs.dropdown", q), b.focus()
}
return !1
}
}, n.prototype.keydown = function(a) {
if (/(38|40|27)/.test(a.keyCode)) {
var c = h(this);
if (a.preventDefault(), a.stopPropagation(), !c.is(".disabled, :disabled")) {
var e = k(c),
p = e.hasClass("open");
if (!p || p && 27 == a.keyCode) {
return 27 == a.which && e.find(m).focus(), c.click()
}
var q = " li:not(.divider):visible a",
r = e.find("[role=menu]" + q + ", [role=listbox]" + q);
if (r.length) {
var s = r.index(r.filter(":focus"));
38 == a.keyCode && s > 0 && s--, 40 == a.keyCode && s < r.length - 1 && s++, ~s || (s = 0), r.eq(s).focus()
}
}
}
};
var o = h.fn.dropdown;
h.fn.dropdown = function(a) {
return this.each(function() {
var b = h(this),
e = b.data("bs.dropdown");
e || b.data("bs.dropdown", e = new n(this)), "string" == typeof a && e[a].call(b)
})
}, h.fn.dropdown.Constructor = n, h.fn.dropdown.noConflict = function() {
return h.fn.dropdown = o, this
}, h(document).on("click.bs.dropdown.data-api", j).on("click.bs.dropdown.data-api", ".dropdown form", function(b) {
b.stopPropagation()
}).on("click.bs.dropdown.data-api", m, n.prototype.toggle).on("keydown.bs.dropdown.data-api", m + ", [role=menu], [role=listbox]", n.prototype.keydown)
}(jQuery), + function(d) {
var e = function(a, g) {
this.options = g, this.$element = d(a), this.$backdrop = this.isShown = null, this.options.remote && this.$element.find(".modal-content").load(this.options.remote, d.proxy(function() {
this.$element.trigger("loaded.bs.modal")
}, this))
};
e.DEFAULTS = {
backdrop: !0,
keyboard: !0,
show: !0
}, e.prototype.toggle = function(b) {
return this[this.isShown ? "hide" : "show"](b)
}, e.prototype.show = function(a) {
var g = this,
h = d.Event("show.bs.modal", {
relatedTarget: a
});
this.$element.trigger(h), this.isShown || h.isDefaultPrevented() || (this.isShown = !0, this.escape(), this.$element.on("click.dismiss.bs.modal", '[data-dismiss="modal"]', d.proxy(this.hide, this)), this.backdrop(function() {
var b = d.support.transition && g.$element.hasClass("fade");
g.$element.parent().length || g.$element.appendTo(document.body), g.$element.show().scrollTop(0), b && g.$element[0].offsetWidth, g.$element.addClass("in").attr("aria-hidden", !1), g.enforceFocus();
var c = d.Event("shown.bs.modal", {
relatedTarget: a
});
b ? g.$element.find(".modal-dialog").one(d.support.transition.end, function() {
g.$element.focus().trigger(c)
}).emulateTransitionEnd(300) : g.$element.focus().trigger(c)
}))
}, e.prototype.hide = function(a) {
a && a.preventDefault(), a = d.Event("hide.bs.modal"), this.$element.trigger(a), this.isShown && !a.isDefaultPrevented() && (this.isShown = !1, this.escape(), d(document).off("focusin.bs.modal"), this.$element.removeClass("in").attr("aria-hidden", !0).off("click.dismiss.bs.modal"), d.support.transition && this.$element.hasClass("fade") ? this.$element.one(d.support.transition.end, d.proxy(this.hideModal, this)).emulateTransitionEnd(300) : this.hideModal())
}, e.prototype.enforceFocus = function() {
d(document).off("focusin.bs.modal").on("focusin.bs.modal", d.proxy(function(b) {
this.$element[0] === b.target || this.$element.has(b.target).length || this.$element.focus()
}, this))
}, e.prototype.escape = function() {
this.isShown && this.options.keyboard ? this.$element.on("keyup.dismiss.bs.modal", d.proxy(function(b) {
27 == b.which && this.hide()
}, this)) : this.isShown || this.$element.off("keyup.dismiss.bs.modal")
}, e.prototype.hideModal = function() {
var b = this;
this.$element.hide(), this.backdrop(function() {
b.removeBackdrop(), b.$element.trigger("hidden.bs.modal")
})
}, e.prototype.removeBackdrop = function() {
this.$backdrop && this.$backdrop.remove(), this.$backdrop = null
}, e.prototype.backdrop = function(a) {
var g = this.$element.hasClass("fade") ? "fade" : "";
if (this.isShown && this.options.backdrop) {
var h = d.support.transition && g;
if (this.$backdrop = d('').appendTo(document.body), this.$element.on("click.dismiss.bs.modal", d.proxy(function(b) {
b.target === b.currentTarget && ("static" == this.options.backdrop ? this.$element[0].focus.call(this.$element[0]) : this.hide.call(this))
}, this)), h && this.$backdrop[0].offsetWidth, this.$backdrop.addClass("in"), !a) {
return
}
h ? this.$backdrop.one(d.support.transition.end, a).emulateTransitionEnd(150) : a()
} else {
!this.isShown && this.$backdrop ? (this.$backdrop.removeClass("in"), d.support.transition && this.$element.hasClass("fade") ? this.$backdrop.one(d.support.transition.end, a).emulateTransitionEnd(150) : a()) : a && a()
}
};
var f = d.fn.modal;
d.fn.modal = function(a, b) {
return this.each(function() {
var c = d(this),
h = c.data("bs.modal"),
j = d.extend({}, e.DEFAULTS, c.data(), "object" == typeof a && a);
h || c.data("bs.modal", h = new e(this, j)), "string" == typeof a ? h[a](b) : j.show && h.show(b)
})
}, d.fn.modal.Constructor = e, d.fn.modal.noConflict = function() {
return d.fn.modal = f, this
}, d(document).on("click.bs.modal.data-api", '[data-toggle="modal"]', function(a) {
var g = d(this),
h = g.attr("href"),
j = d(g.attr("data-target") || h && h.replace(/.*(?=#[^\s]+$)/, "")),
k = j.data("bs.modal") ? "toggle" : d.extend({
remote: !/#/.test(h) && h
}, j.data(), g.data());
g.is("a") && a.preventDefault(), j.modal(k, this).one("hide", function() {
g.is(":visible") && g.focus()
})
}), d(document).on("show.bs.modal", ".modal", function() {
d(document.body).addClass("modal-open")
}).on("hidden.bs.modal", ".modal", function() {
d(document.body).removeClass("modal-open")
})
}(jQuery), + function(d) {
var e = function(c, g) {
this.type = this.options = this.enabled = this.timeout = this.hoverState = this.$element = null, this.init("tooltip", c, g)
};
e.DEFAULTS = {
animation: !0,
placement: "top",
selector: !1,
template: '',
trigger: "hover focus",
title: "",
delay: 0,
html: !1,
container: !1
}, e.prototype.init = function(a, j, k) {
this.enabled = !0, this.type = a, this.$element = d(j), this.options = this.getOptions(k);
for (var l = this.options.trigger.split(" "), m = l.length; m--;) {
var n = l[m];
if ("click" == n) {
this.$element.on("click." + this.type, this.options.selector, d.proxy(this.toggle, this))
} else {
if ("manual" != n) {
var o = "hover" == n ? "mouseenter" : "focusin",
p = "hover" == n ? "mouseleave" : "focusout";
this.$element.on(o + "." + this.type, this.options.selector, d.proxy(this.enter, this)), this.$element.on(p + "." + this.type, this.options.selector, d.proxy(this.leave, this))
}
}
}
this.options.selector ? this._options = d.extend({}, this.options, {
trigger: "manual",
selector: ""
}) : this.fixTitle()
}, e.prototype.getDefaults = function() {
return e.DEFAULTS
}, e.prototype.getOptions = function(a) {
return a = d.extend({}, this.getDefaults(), this.$element.data(), a), a.delay && "number" == typeof a.delay && (a.delay = {
show: a.delay,
hide: a.delay
}), a
}, e.prototype.getDelegateOptions = function() {
var a = {},
g = this.getDefaults();
return this._options && d.each(this._options, function(b, c) {
g[b] != c && (a[b] = c)
}), a
}, e.prototype.enter = function(a) {
var g = a instanceof this.constructor ? a : d(a.currentTarget)[this.type](this.getDelegateOptions()).data("bs." + this.type);
return clearTimeout(g.timeout), g.hoverState = "in", g.options.delay && g.options.delay.show ? void(g.timeout = setTimeout(function() {
"in" == g.hoverState && g.show()
}, g.options.delay.show)) : g.show()
}, e.prototype.leave = function(a) {
var g = a instanceof this.constructor ? a : d(a.currentTarget)[this.type](this.getDelegateOptions()).data("bs." + this.type);
return clearTimeout(g.timeout), g.hoverState = "out", g.options.delay && g.options.delay.hide ? void(g.timeout = setTimeout(function() {
"out" == g.hoverState && g.hide()
}, g.options.delay.hide)) : g.hide()
}, e.prototype.show = function() {
var a = d.Event("show.bs." + this.type);
if (this.hasContent() && this.enabled) {
if (this.$element.trigger(a), a.isDefaultPrevented()) {
return
}
var s = this,
t = this.tip();
this.setContent(), this.options.animation && t.addClass("fade");
var u = "function" == typeof this.options.placement ? this.options.placement.call(this, t[0], this.$element[0]) : this.options.placement,
v = /\s?auto?\s?/i,
w = v.test(u);
w && (u = u.replace(v, "") || "top"), t.detach().css({
top: 0,
left: 0,
display: "block"
}).addClass(u), this.options.container ? t.appendTo(this.options.container) : t.insertAfter(this.$element);
var x = this.getPosition(),
y = t[0].offsetWidth,
z = t[0].offsetHeight;
if (w) {
var A = this.$element.parent(),
B = u,
C = document.documentElement.scrollTop || document.body.scrollTop,
D = "body" == this.options.container ? window.innerWidth : A.outerWidth(),
E = "body" == this.options.container ? window.innerHeight : A.outerHeight(),
F = "body" == this.options.container ? 0 : A.offset().left;
u = "bottom" == u && x.top + x.height + z - C > E ? "top" : "top" == u && x.top - C - z < 0 ? "bottom" : "right" == u && x.right + y > D ? "left" : "left" == u && x.left - y < F ? "right" : u, t.removeClass(B).addClass(u)
}
var G = this.getCalculatedOffset(u, x, y, z);
this.applyPlacement(G, u), this.hoverState = null;
var H = function() {
s.$element.trigger("shown.bs." + s.type)
};
d.support.transition && this.$tip.hasClass("fade") ? t.one(d.support.transition.end, H).emulateTransitionEnd(150) : H()
}
}, e.prototype.applyPlacement = function(a, m) {
var n, o = this.tip(),
p = o[0].offsetWidth,
q = o[0].offsetHeight,
r = parseInt(o.css("margin-top"), 10),
s = parseInt(o.css("margin-left"), 10);
isNaN(r) && (r = 0), isNaN(s) && (s = 0), a.top = a.top + r, a.left = a.left + s, d.offset.setOffset(o[0], d.extend({
using: function(b) {
o.css({
top: Math.round(b.top),
left: Math.round(b.left)
})
}
}, a), 0), o.addClass("in");
var t = o[0].offsetWidth,
u = o[0].offsetHeight;
if ("top" == m && u != q && (n = !0, a.top = a.top + q - u), /bottom|top/.test(m)) {
var v = 0;
a.left < 0 && (v = -2 * a.left, a.left = 0, o.offset(a), t = o[0].offsetWidth, u = o[0].offsetHeight), this.replaceArrow(v - p + t, t, "left")
} else {
this.replaceArrow(u - q, u, "top")
}
n && o.offset(a)
}, e.prototype.replaceArrow = function(g, h, j) {
this.arrow().css(j, g ? 50 * (1 - g / h) + "%" : "")
}, e.prototype.setContent = function() {
var c = this.tip(),
g = this.getTitle();
c.find(".tooltip-inner")[this.options.html ? "html" : "text"](g), c.removeClass("fade in top bottom left right")
}, e.prototype.hide = function() {
function a() {
"in" != g.hoverState && h.detach(), g.$element.trigger("hidden.bs." + g.type)
}
var g = this,
h = this.tip(),
j = d.Event("hide.bs." + this.type);
return this.$element.trigger(j), j.isDefaultPrevented() ? void 0 : (h.removeClass("in"), d.support.transition && this.$tip.hasClass("fade") ? h.one(d.support.transition.end, a).emulateTransitionEnd(150) : a(), this.hoverState = null, this)
}, e.prototype.fixTitle = function() {
var b = this.$element;
(b.attr("title") || "string" != typeof b.attr("data-original-title")) && b.attr("data-original-title", b.attr("title") || "").attr("title", "")
}, e.prototype.hasContent = function() {
return this.getTitle()
}, e.prototype.getPosition = function() {
var a = this.$element[0];
return d.extend({}, "function" == typeof a.getBoundingClientRect ? a.getBoundingClientRect() : {
width: a.offsetWidth,
height: a.offsetHeight
}, this.$element.offset())
}, e.prototype.getCalculatedOffset = function(g, h, j, k) {
return "bottom" == g ? {
top: h.top + h.height,
left: h.left + h.width / 2 - j / 2
} : "top" == g ? {
top: h.top - k,
left: h.left + h.width / 2 - j / 2
} : "left" == g ? {
top: h.top + h.height / 2 - k / 2,
left: h.left - j
} : {
top: h.top + h.height / 2 - k / 2,
left: h.left + h.width
}
}, e.prototype.getTitle = function() {
var g, h = this.$element,
j = this.options;
return g = h.attr("data-original-title") || ("function" == typeof j.title ? j.title.call(h[0]) : j.title)
}, e.prototype.tip = function() {
return this.$tip = this.$tip || d(this.options.template)
}, e.prototype.arrow = function() {
return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
}, e.prototype.validate = function() {
this.$element[0].parentNode || (this.hide(), this.$element = null, this.options = null)
}, e.prototype.enable = function() {
this.enabled = !0
}, e.prototype.disable = function() {
this.enabled = !1
}, e.prototype.toggleEnabled = function() {
this.enabled = !this.enabled
}, e.prototype.toggle = function(a) {
var g = a ? d(a.currentTarget)[this.type](this.getDelegateOptions()).data("bs." + this.type) : this;
g.tip().hasClass("in") ? g.leave(g) : g.enter(g)
}, e.prototype.destroy = function() {
clearTimeout(this.timeout), this.hide().$element.off("." + this.type).removeData("bs." + this.type)
};
var f = d.fn.tooltip;
d.fn.tooltip = function(a) {
return this.each(function() {
var b = d(this),
c = b.data("bs.tooltip"),
g = "object" == typeof a && a;
(c || "destroy" != a) && (c || b.data("bs.tooltip", c = new e(this, g)), "string" == typeof a && c[a]())
})
}, d.fn.tooltip.Constructor = e, d.fn.tooltip.noConflict = function() {
return d.fn.tooltip = f, this
}
}(jQuery), + function(d) {
var e = function(c, g) {
this.init("popover", c, g)
};
if (!d.fn.tooltip) {
throw new Error("Popover requires tooltip.js")
}
e.DEFAULTS = d.extend({}, d.fn.tooltip.Constructor.DEFAULTS, {
placement: "right",
trigger: "click",
content: "",
template: ''
}), e.prototype = d.extend({}, d.fn.tooltip.Constructor.prototype), e.prototype.constructor = e, e.prototype.getDefaults = function() {
return e.DEFAULTS
}, e.prototype.setContent = function() {
var g = this.tip(),
h = this.getTitle(),
j = this.getContent();
g.find(".popover-title")[this.options.html ? "html" : "text"](h), g.find(".popover-content")[this.options.html ? "string" == typeof j ? "html" : "append" : "text"](j), g.removeClass("fade top bottom left right in"), g.find(".popover-title").html() || g.find(".popover-title").hide()
}, e.prototype.hasContent = function() {
return this.getTitle() || this.getContent()
}, e.prototype.getContent = function() {
var c = this.$element,
g = this.options;
return c.attr("data-content") || ("function" == typeof g.content ? g.content.call(c[0]) : g.content)
}, e.prototype.arrow = function() {
return this.$arrow = this.$arrow || this.tip().find(".arrow")
}, e.prototype.tip = function() {
return this.$tip || (this.$tip = d(this.options.template)), this.$tip
};
var f = d.fn.popover;
d.fn.popover = function(a) {
return this.each(function() {
var b = d(this),
c = b.data("bs.popover"),
g = "object" == typeof a && a;
(c || "destroy" != a) && (c || b.data("bs.popover", c = new e(this, g)), "string" == typeof a && c[a]())
})
}, d.fn.popover.Constructor = e, d.fn.popover.noConflict = function() {
return d.fn.popover = f, this
}
}(jQuery), + function(d) {
function e(a, b) {
var g, h = d.proxy(this.process, this);
this.$element = d(d(a).is("body") ? window : a), this.$body = d("body"), this.$scrollElement = this.$element.on("scroll.bs.scroll-spy.data-api", h), this.options = d.extend({}, e.DEFAULTS, b), this.selector = (this.options.target || (g = d(a).attr("href")) && g.replace(/.*(?=#[^\s]+$)/, "") || "") + " .nav li > a", this.offsets = d([]), this.targets = d([]), this.activeTarget = null, this.refresh(), this.process()
}
e.DEFAULTS = {
offset: 10
}, e.prototype.refresh = function() {
var a = this.$element[0] == window ? "offset" : "position";
this.offsets = d([]), this.targets = d([]);
var g = this;
this.$body.find(this.selector).map(function() {
var b = d(this),
c = b.data("target") || b.attr("href"),
h = /^#./.test(c) && d(c);
return h && h.length && h.is(":visible") && [
[h[a]().top + (!d.isWindow(g.$scrollElement.get(0)) && g.$scrollElement.scrollTop()), c]
] || null
}).sort(function(c, h) {
return c[0] - h[0]
}).each(function() {
g.offsets.push(this[0]), g.targets.push(this[1])
})
}, e.prototype.process = function() {
var h, j = this.$scrollElement.scrollTop() + this.options.offset,
k = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight,
l = k - this.$scrollElement.height(),
m = this.offsets,
n = this.targets,
o = this.activeTarget;
if (j >= l) {
return o != (h = n.last()[0]) && this.activate(h)
}
if (o && j <= m[0]) {
return o != (h = n[0]) && this.activate(h)
}
for (h = m.length; h--;) {
o != n[h] && j >= m[h] && (!m[h + 1] || j <= m[h + 1]) && this.activate(n[h])
}
}, e.prototype.activate = function(a) {
this.activeTarget = a, d(this.selector).parentsUntil(this.options.target, ".active").removeClass("active");
var g = this.selector + '[data-target="' + a + '"],' + this.selector + '[href="' + a + '"]',
h = d(g).parents("li").addClass("active");
h.parent(".dropdown-menu").length && (h = h.closest("li.dropdown").addClass("active")), h.trigger("activate.bs.scrollspy")
};
var f = d.fn.scrollspy;
d.fn.scrollspy = function(a) {
return this.each(function() {
var b = d(this),
c = b.data("bs.scrollspy"),
g = "object" == typeof a && a;
c || b.data("bs.scrollspy", c = new e(this, g)), "string" == typeof a && c[a]()
})
}, d.fn.scrollspy.Constructor = e, d.fn.scrollspy.noConflict = function() {
return d.fn.scrollspy = f, this
}, d(window).on("load", function() {
d('[data-spy="scroll"]').each(function() {
var a = d(this);
a.scrollspy(a.data())
})
})
}(jQuery), + function(d) {
var e = function(a) {
this.element = d(a)
};
e.prototype.show = function() {
var a = this.element,
h = a.closest("ul:not(.dropdown-menu)"),
j = a.data("target");
if (j || (j = a.attr("href"), j = j && j.replace(/.*(?=#[^\s]*$)/, "")), !a.parent("li").hasClass("active")) {
var k = h.find(".active:last a")[0],
l = d.Event("show.bs.tab", {
relatedTarget: k
});
if (a.trigger(l), !l.isDefaultPrevented()) {
var m = d(j);
this.activate(a.parent("li"), h), this.activate(m, m.parent(), function() {
a.trigger({
type: "shown.bs.tab",
relatedTarget: k
})
})
}
}
}, e.prototype.activate = function(a, h, j) {
function k() {
l.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"), a.addClass("active"), m ? (a[0].offsetWidth, a.addClass("in")) : a.removeClass("fade"), a.parent(".dropdown-menu") && a.closest("li.dropdown").addClass("active"), j && j()
}
var l = h.find("> .active"),
m = j && d.support.transition && l.hasClass("fade");
m ? l.one(d.support.transition.end, k).emulateTransitionEnd(150) : k(), l.removeClass("in")
};
var f = d.fn.tab;
d.fn.tab = function(a) {
return this.each(function() {
var b = d(this),
c = b.data("bs.tab");
c || b.data("bs.tab", c = new e(this)), "string" == typeof a && c[a]()
})
}, d.fn.tab.Constructor = e, d.fn.tab.noConflict = function() {
return d.fn.tab = f, this
}, d(document).on("click.bs.tab.data-api", '[data-toggle="tab"], [data-toggle="pill"]', function(a) {
a.preventDefault(), d(this).tab("show")
})
}(jQuery), + function(d) {
var e = function(a, b) {
this.options = d.extend({}, e.DEFAULTS, b), this.$window = d(window).on("scroll.bs.affix.data-api", d.proxy(this.checkPosition, this)).on("click.bs.affix.data-api", d.proxy(this.checkPositionWithEventLoop, this)), this.$element = d(a), this.affixed = this.unpin = this.pinnedOffset = null, this.checkPosition()
};
e.RESET = "affix affix-top affix-bottom", e.DEFAULTS = {
offset: 0
}, e.prototype.getPinnedOffset = function() {
if (this.pinnedOffset) {
return this.pinnedOffset
}
this.$element.removeClass(e.RESET).addClass("affix");
var b = this.$window.scrollTop(),
g = this.$element.offset();
return this.pinnedOffset = g.top - b
}, e.prototype.checkPositionWithEventLoop = function() {
setTimeout(d.proxy(this.checkPosition, this), 1)
}, e.prototype.checkPosition = function() {
if (this.$element.is(":visible")) {
var a = d(document).height(),
b = this.$window.scrollTop(),
l = this.$element.offset(),
m = this.options.offset,
n = m.top,
o = m.bottom;
"top" == this.affixed && (l.top += b), "object" != typeof m && (o = n = m), "function" == typeof n && (n = m.top(this.$element)), "function" == typeof o && (o = m.bottom(this.$element));
var p = null != this.unpin && b + this.unpin <= l.top ? !1 : null != o && l.top + this.$element.height() >= a - o ? "bottom" : null != n && n >= b ? "top" : !1;
if (this.affixed !== p) {
this.unpin && this.$element.css("top", "");
var q = "affix" + (p ? "-" + p : ""),
r = d.Event(q + ".bs.affix");
this.$element.trigger(r), r.isDefaultPrevented() || (this.affixed = p, this.unpin = "bottom" == p ? this.getPinnedOffset() : null, this.$element.removeClass(e.RESET).addClass(q).trigger(d.Event(q.replace("affix", "affixed"))), "bottom" == p && this.$element.offset({
top: a - o - this.$element.height()
}))
}
}
};
var f = d.fn.affix;
d.fn.affix = function(a) {
return this.each(function() {
var b = d(this),
c = b.data("bs.affix"),
g = "object" == typeof a && a;
c || b.data("bs.affix", c = new e(this, g)), "string" == typeof a && c[a]()
})
}, d.fn.affix.Constructor = e, d.fn.affix.noConflict = function() {
return d.fn.affix = f, this
}, d(window).on("load", function() {
d('[data-spy="affix"]').each(function() {
var a = d(this),
g = a.data();
g.offset = g.offset || {}, g.offsetBottom && (g.offset.bottom = g.offsetBottom), g.offsetTop && (g.offset.top = g.offsetTop), a.affix(g)
})
})
}(jQuery);
var BrainJocks = BrainJocks || {};
BrainJocks.BootstrapUI = (function(a) {
function b() {}
function c() {
var d = a("h1, h2, h3, h4, h5, h6, p, li");
a(window).resize(function() {
d.css("z-index", 1)
});
a(".score-carousel").find(".item.score-carouselpane").removeClass("active");
a(".score-carousel").find(".item.score-carouselpane").first().addClass("active");
a(".score-carousel").each(function() {
var e = a(this);
var f = e.data.rotationSpeed;
if (a.isNumeric(f) && f >= 1) {
e.carousel({
interval: f
})
}
});
a('.score-accordion a[data-toggle="collapse"]').each(function() {
var e = a(this).closest(".score-accordion")[0];
a(this).attr("data-parent", "#" + e.id)
});
a(".score-tab").each(function() {
var e = a(this);
var g = e.find(".nav").first();
var f = e.find(".tab-content").first();
f.find(".tab-pane").each(function() {
var k = a(this);
var h = k.prop("id");
var l = k.data("title");
var j = "" + l + "";
g.append(j)
});
g.find("li").first().addClass("active");
f.find("div.tab-pane").first().addClass("active")
});
a(".score-accordion").each(function() {
a(this).find(".panel-collapse").first().addClass("in")
});
a(".score-tab").each(function() {
a(this).find(".tab-pane").first().addClass("in")
});
a(".score-megamenu").find(".btn").addClass("navbar-btn")
}
return {
run: c,
prepare: b
}
})(jQuery);
$(function() {
BrainJocks.BootstrapUI.prepare()
});
$(document).ready(function() {
BrainJocks.BootstrapUI.run()
});
(function(h) {
function m() {
var s = h();
if (h.each(k, function(o, t) {
var u = t.data.selector,
c = t.$element;
s = s.add(u ? c.find(u) : c)
}), s.length) {
for (var p = 0; s.length > p; p++) {
if (s[p]) {
if (h.contains(l, s[p])) {
var d = h(s[p]),
e = d.data("inview"),
q = d[0].getBoundingClientRect(),
r = d.height() + 600,
n = d.width();
q.top >= 0 - r && q.left >= 0 - n && q.bottom <= (g.innerHeight || l.clientHeight) + (r - 600) && q.right <= (g.innerWidth || l.clientWidth) + n ? e || d.data("inview", !0).trigger("inview", [!0]) : e && d.data("inview", !1).trigger("inview", [!1])
} else {
delete s[p]
}
}
}
}
}
var j, k = {},
b = document,
g = window,
l = b.documentElement,
f = h.expando;
h.event.special.inview = {
add: function(c) {
k[c.guid + "-" + this[f]] = {
data: c,
$element: h(this)
}, j || h.isEmptyObject(k) || (j = setInterval(m, 333))
},
remove: function(d) {
try {
delete k[d.guid + "-" + this[f]]
} catch (c) {}
h.isEmptyObject(k) && (clearInterval(j), j = null)
}
}
})(jQuery);
var pageUrl = location.href;
var hostName = location.hostname;
function setPrinterText() {
$(".page-url").text(pageUrl)
}
if ($("#floatingDesktopISI #isiCopy").length) {
$("#isiCopyMobile").bind("inview", function(a, b) {
if (b) {
$("#floatingDesktopISI #isiCopy").fadeOut()
} else {
$("#floatingDesktopISI #isiCopy").fadeIn()
}
})
}
$("#floatingDesktopISI #isiCopy h2").click(function() {
$("html, body").removeAttr("style").animate({
scrollTop: $("#isiCopyMobile").offset().top
}, 2000);
$("#floatingDesktopISI #isiCopy").fadeOut()
});
$(window).scroll(function() {
var b = $(window).scrollTop();
var a = $(window).height()
});
function toggleISI(a) {
$(".isi-main-copy-mobile").toggle();
$(".isi-main-copy").toggle();
if ($("#isiCopy").attr("style")) {
$("#isiCopy").height("");
$(".isi-main-copy").height("")
} else {
$("#isiCopy").height(window.innerHeight - 40);
$(".isi-main-copy").height(window.innerHeight - 85)
}
$(a).toggleClass("glyphicon-plus");
$(a).toggleClass("glyphicon-minus")
}
$(".glyphicon-minus").click(function() {
$("#isiCopy").removeAttr("style")
});
function createCookie(b, c) {
var a = "";
document.cookie = b + "=" + c + "; " + a + "; path=/"
}
function readCookie(e) {
var f = e + "=";
var b = document.cookie.split(";");
for (var d = 0; d < b.length; d++) {
var a = b[d];
while (a.charAt(0) == " ") {
a = a.substring(1, a.length)
}
if (a.indexOf(f) == 0) {
return a.substring(f.length, a.length)
}
}
return null
}
function eraseCookie(a) {
createCookie(a, "", -1)
}
function setFont(a) {
var b;
$(".font-selector span").each(function() {
$(this).removeClass("selected")
});
$(a).addClass("selected");
if (a.hasClass("font-med")) {
$("body .text-component, body .text-component p, body .text-component div, body .isi-main-copy, body .isi-main-copy p, body .isi-main-copy div").css({
"font-size": "18px"
});
b = "18px"
} else {
if (a.hasClass("font-lg")) {
$("body .text-component, body .text-component p, body .text-component div, body .isi-main-copy, body .isi-main-copy p, body .isi-main-copy div").css({
"font-size": "21px"
});
b = "21px"
} else {
$("body .text-component, body .text-component p, body .text-component div, body .isi-main-copy, body .isi-main-copy p, body .isi-main-copy div").css({
"font-size": "14px"
});
b = "14px"
}
}
createCookie("font_size", b);
createCookie("ISI_font_size", b)
}
function populateAnchorTag(e, f, d, b, c, a) {
var g = !!JSON.parse(e.toLowerCase()) ? "_blank" : "_self";
if (!!JSON.parse(d.toLowerCase())) {
jQuery("div.imgDiv").wrap('')
}
if (!!JSON.parse(b.toLowerCase())) {
jQuery("div.textimagebox").wrap('')
}
if (!!JSON.parse(c.toLowerCase())) {
jQuery("div.textHeading").wrap('')
}
if (!!JSON.parse(a.toLowerCase())) {
jQuery("div.buttonText").wrap('')
}
}
function SetBrandName(a) {
if (a != "" && a != undefined) {
hostName = a + ".com"
}
}
function SearchFocus(a) {
a.removeAttr("placeholder");
if (a.val() != "") {
a.val("")
}
}
function SearchBlur(a) {
a.attr("placeholder", "Search");
if (Modernizr.input.placeholder) {} else {
if (a.val() == "" || a.val() == "Search") {
a.val("Search")
}
}
}
function SetSearchText() {
$("#EMSCoveoDesktopSearchBox .CoveoQueryBox, #EMSCoveoMobileSearchBox .CoveoQueryBox, #EMSCoveo404Search .CoveoQueryBox").blur();
if (Modernizr.input.placeholder) {} else {
$("#EMSCoveoDesktopSearchBox .CoveoQueryBox, #EMSCoveo404Search .CoveoQueryBox").val("Search")
}
}
var pfHeaderImgUrl = "";
var pfHeaderTagline = "";
var pfdisableClickToDel = 1;
var pfHideImages = 0;
var pfImageDisplayStyle = "none";
var pfDisablePDF = 0;
var pfDisableEmail = 1;
var pfDisablePrint = 1;
var pfCustomCSS = "http://" + hostName + "/Areas/GlobalComponents/css/Brands/" + hostName + "/print.css";
var pfBtVersion = "1";
function printFriendly(a) {
$("script[src='http://cdn.printfriendly.com/printfriendly.js']").remove();
if (a == "noPrint") {
pfDisablePrint = 1
} else {
pfDisablePrint = 0
}
$.getScript("http://cdn.printfriendly.com/printfriendly.js", function() {
window.print()
})
}
$(document).ready(function() {
processCoachUrls();
$(".print-btn").click(function() {
(window).print()
});
setPrinterText();
SetSearchText();
$("#EMSCoveoDesktopSearchBox .CoveoQueryBox, #EMSCoveoMobileSearchBox .CoveoQueryBox, #EMSCoveo404Search .CoveoQueryBox").focus(function() {
var e = $(this);
SearchFocus(e)
});
$("#EMSCoveoDesktopSearchBox .CoveoQueryBox, #EMSCoveoMobileSearchBox .CoveoQueryBox, #EMSCoveo404Search .CoveoQueryBox").blur(function() {
var e = $(this);
SearchBlur(e)
});
if ($("#brandName") != undefined) {
SetBrandName($("#brandName").val())
}
$(".nav-tabs .dropdown-menu").hover(function() {
$(this).prev().toggleClass("active-submenu")
}, function() {
$(this).prev().toggleClass("active-submenu")
});
$(".isi-button .glyphicon").click(function() {
toggleISI($(this))
});
$(".font-selector span").click(function() {
setFont($(this))
});
if (readCookie("font_size") == "14px") {
$("body .text-component, body .text-component p, body .text-component div, body .isi-main-copy, body .isi-main-copy p, body .isi-main-copy div").css({
"font-size": "14px"
});
$(".font-selector span").each(function() {
$(this).removeClass("selected")
});
$(".font-selector span:eq(0)").addClass("selected")
} else {
if (readCookie("font_size") == "18px") {
$("body .text-component, body .text-component p, body .text-component div, body .isi-main-copy, body .isi-main-copy p, body .isi-main-copy div").css({
"font-size": "18px"
});
$(".font-selector span").each(function() {
$(this).removeClass("selected")
});
$(".font-selector span:eq(1)").addClass("selected")
} else {
if (readCookie("font_size") == "21px") {
$("body .text-component, body .text-component p, body .text-component div, body .isi-main-copy, body .isi-main-copy p, body .isi-main-copy div").css({
"font-size": "21px"
});
$(".font-selector span").each(function() {
$(this).removeClass("selected")
});
$(".font-selector span:eq(2)").addClass("selected")
}
}
}
$(".share-btn").click(function() {
if ($(this).hasClass("selected")) {
$(".share-show-hide").hide();
$(this).removeClass("selected")
} else {
$(".share-show-hide").show();
$(this).addClass("selected")
}
return false
});
$(".share-show-hide li").click(function() {
$(".share-show-hide").hide();
$(".share-btn").removeClass("selected")
});
$(".share-show-hide .social-pop-up").click(function() {
var f = $(this).attr("product-name");
var e = $(this).attr("brand-name");
var h = $(this).attr("website-name");
var g = $(this).attr("url-path");
$("#myModal .product-name").text(f);
$("#myModal .brand-name").text(e);
$("#myModal .website-name").text(h);
$("#myModal .goToSite").attr("website-path", g)
});
$(".goToSite").click(function() {
var e = $(this).attr("website-path");
window.open(e)
});
if ($("#hdnHCPLinks").length) {
lstHCPLinks = $("#hdnHCPLinks").val().replace(/http:\/\//g, "").replace(/https:\/\//g, "").replace(/www./g, "").replace(/\\/g, "/");
var b = [];
if (lstHCPLinks.length > 0) {
b = lstHCPLinks.split(",");
for (i = 0; i < b.length; i++) {
if (b[i].slice(-1) == "/") {
b[i] = b[i].slice(0, -1)
}
b[i] = b[i].toLowerCase()
}
}
}
if ($("#hdnExternalLinks").length) {
lstExternalLinks = $("#hdnExternalLinks").val().replace(/http:\/\//g, "").replace(/https:\/\//g, "").replace(/www./g, "");
var a = [];
if (lstExternalLinks.length > 0) {
a = lstExternalLinks.split(",");
for (i = 0; i < a.length; i++) {
a[i] = $.trim(a[i]);
if (a[i].slice(-1) == "/") {
a[i] = a[i].slice(0, -1)
}
a[i] = a[i].toLowerCase()
}
}
}
if ($("#hdnRegionLinks").length) {
lstRegionLinks = $("#hdnRegionLinks").val().replace(/http:\/\//g, "").replace(/https:\/\//g, "").replace(/www./g, "").replace(/\\/g, "/");
var c = [];
if (lstRegionLinks.length > 0) {
c = lstRegionLinks.split(",");
for (i = 0; i < c.length; i++) {
if (c[i].slice(-1) == "/") {
c[i] = c[i].slice(0, -1)
}
c[i] = c[i].toLowerCase()
}
}
}
if ($("#hdnUnbrandedLinks").length) {
lstUnbrandedLinks = $("#hdnUnbrandedLinks").val().replace(/http:\/\//g, "").replace(/https:\/\//g, "").replace(/www./g, "").replace(/\\/g, "/");
var d = [];
if (lstUnbrandedLinks.length > 0) {
d = lstUnbrandedLinks.split(",");
for (i = 0; i < d.length; i++) {
if (d[i].slice(-1) == "/") {
d[i] = d[i].slice(0, -1)
}
d[i] = d[i].toLowerCase()
}
}
}
if ($(".panel-group")) {
$(".panel-group div:first-child div.panel-heading h4 a").trigger("click")
}
$("a").each(function() {
if (b != undefined) {
if (typeof($(this).attr("href")) != "undefined") {
if ($(this).attr("href").indexOf("http") == 0 || $(this).attr("href").indexOf("www") == 0) {
var e = $.trim(($(this).attr("href")));
e = $.trim($(this).attr("href").replace(/http:\/\//g, "").replace(/https:\/\//g, "")).replace(/www./g, "").replace(/\\/g, "/");
if (e.slice(-1) == "/") {
e = e.slice(0, -1)
}
e = e.toLowerCase();
var g = false;
if (hostName == "") {
hostName = location.hostname
}
if (e.length > 1) {
var f = [];
f = e.split("/");
for (i = 0; i < b.length; i++) {
if (e.toLowerCase() === b[i].toLowerCase()) {
g = true;
$(this).addClass("lnkHCP");
$(this).attr("brand-name", hostName);
$(this).attr("website-name", f[0]);
$(this).attr("data-toggle", "modal");
$(this).attr("data-target", "#hcpMod");
break
}
}
if (!g) {
for (i = 0; i < a.length; i++) {
if (f[0].toLowerCase() === a[i].toLowerCase()) {
g = true;
$(this).addClass("lnkExternal");
$(this).attr("brand-name", hostName);
$(this).attr("website-name", f[0]);
$(this).attr("data-toggle", "modal");
$(this).attr("data-target", "#thirdPartyMod");
break
}
}
}
if (!g) {
for (i = 0; i < c.length; i++) {
if (e.toLowerCase() === c[i].toLowerCase()) {
g = true;
$(this).addClass("lnkRegion");
$(this).attr("brand-name", hostName);
$(this).attr("website-name", f[0]);
$(this).attr("data-toggle", "modal");
$(this).attr("data-target", "#regionMod");
break
}
}
}
if (!g) {
for (i = 0; i < d.length; i++) {
if (e.toLowerCase() === d[i].toLowerCase()) {
g = true;
$(this).addClass("lnkUnbranded");
$(this).attr("brand-name", hostName);
$(this).attr("website-name", f[0]);
$(this).attr("data-toggle", "modal");
$(this).attr("data-target", "#unbrandedMod");
break
}
}
}
}
}
}
}
});
$(".lnkHCP,.lnkExternal,.lnkRegion, .lnkUnbranded").each(function() {
$(this).on("click", function(g) {
g.preventDefault();
var f = $(this).attr("brand-name");
var h = $(this).attr("href");
if ($(this).attr("data-targethost") != undefined) {
var j = $(this).attr("data-targethost")
} else {
var j = $(this).attr("website-name")
}
if ($(this).attr("class").indexOf("lnkHCP") > -1) {
$("#hcpMod .brand-name").text(f);
$("#hcpMod .website-name").text(j);
$("#hcpMod .websiteBtn").attr("website-path", h)
} else {
if ($(this).attr("class").indexOf("lnkExternal") > -1) {
$("#thirdPartyMod .brand-name").text(f);
$("#thirdPartyMod .website-name").text(j);
$("#thirdPartyMod .websiteBtn").attr("website-path", h)
} else {
if ($(this).attr("class").indexOf("lnkRegion") > -1) {
$("#regionMod .brand-name").text(f);
$("#regionMod .website-name").text(j);
$("#regionMod .websiteBtn").attr("website-path", h)
} else {
if ($(this).attr("class").indexOf("lnkUnbranded") > -1) {
$("#unbrandedMod .brand-name").text(f);
$("#unbrandedMod .website-name").text(j);
$("#unbrandedMod .websiteBtn").attr("website-path", h)
}
}
}
}
})
});
$(".websiteBtn").each(function() {
$(this).on("click", function(f) {
var g = $(this).attr("website-path");
$(this).attr("data-dismiss", "modal");
window.open(g)
})
});
$.ajaxPrefilter(function(e) {
var f = $("#RequestTokenID").val();
if (!e.beforeSend) {
e.beforeSend = function(g) {
g.setRequestHeader("RequestVerificationToken", f)
}
}
});
if ($("#enablePrintCanvas")[0] != null && $("#enablePrintCanvas")[0] != undefined) {
$(".print-btn").unbind("click");
$(".print-btn").click(function() {
$.getScript("/Areas/GlobalComponents/js/Global/vendor/html2canvas.min.js", function() {
html2canvas($("body"), {
onrendered: function(e) {
var f = e.toDataURL("image/png");
var g = window.open(f, "_self");
g.document.write('
');
g.print();
g.location.reload()
}
})
})
})
}
});
function processCoachUrls() {
var b = location.hostname + ".utmz";
if (readCookie(b) != null) {
$('a[href*="coach.toujeo.com"]').each(function() {
var j = $(this).attr("href");
j += (j.match(/\?/) ? "&" : "?") + readCookie(b);
$(this).attr("href", j)
})
} else {
var c = "";
var h = getParameterByName("utm_campaign");
var d = getParameterByName("utm_medium");
var a = getParameterByName("utm_content");
var f = getParameterByName("utm_source");
var g = getParameterByName("utm_term");
var e = getParameterByName("moc");
if ($.trim(h) != "") {
c += "utm_campaign=" + h + "&"
}
if ($.trim(d) != "") {
c += "utm_medium=" + d + "&"
}
if ($.trim(a) != "") {
c += "utm_content=" + a + "&"
}
if ($.trim(f) != "") {
c += "utm_source=" + f + "&"
}
if ($.trim(g) != "") {
c += "utm_term=" + g + "&";
if ($.trim(e) != "") {
c += "moc=" + e + "&"
} else {
if ($.trim(g).split("_").length > 1) {
c += "moc=" + $.trim(g).split("_")[1] + "&"
}
}
}
if ($.trim(c) != "") {
createCookie(b, c.substring(0, c.length - 1));
$('a[href*="coach.toujeo.com"]').each(function() {
var j = $(this).attr("href");
j += (j.match(/\?/) ? "&" : "?") + readCookie(b);
$(this).attr("href", j)
})
}
}
}
function getParameterByName(a) {
a = a.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var b = new RegExp("[\\?&]" + a + "=([^]*)"),
c = b.exec(location.search);
return c === null ? "" : decodeURIComponent(c[1].replace(/\+/g, " "))
}
function LoadDTSearchResults() {
$(".CoveoSearchBox").addClass("coveo-executing-query");
if ($("#brandSearchDT #searchtextbox").val().length > 0) {
window.location.href = window.location.protocol + "//" + window.location.hostname + $("#hdnSearchPageUrl").val() + "#q=" + $("#brandSearchDT #searchtextbox").val()
} else {
window.location.href = window.location.protocol + "//" + window.location.hostname + $("#hdnSearchPageUrl").val() + "#"
}
$(".CoveoSearchBox").removeClass("coveo-executing-query")
}
function LoadMBSearchResults() {
$(".CoveoSearchBox").addClass("coveo-executing-query");
if ($("#brandSearchMB #searchtextbox").val().length > 0) {
window.location.href = window.location.protocol + "//" + window.location.hostname + $("#hdnSearchPageUrl").val() + "#q=" + $("#brandSearchMB #searchtextbox").val()
} else {
window.location.href = window.location.protocol + "//" + window.location.hostname + $("#hdnSearchPageUrl").val() + "#"
}
$(".CoveoSearchBox").removeClass("coveo-executing-query")
}
$("#brandSearchDT #searchbutton").click(function() {
LoadDTSearchResults()
});
$("#brandSearchMB #searchbutton").click(function() {
LoadMBSearchResults()
});
$("#brandSearchDT #searchtextbox").keypress(function(a) {
if (a.keyCode == 13) {
LoadDTSearchResults()
}
});
$("#brandSearchMB #searchtextbox").keypress(function(a) {
if (a.keyCode == 13) {
LoadMBSearchResults()
}
});
$("#brandSearchDT #searchtextbox").keyup(function() {
if ($("#brandSearchDT #searchtextbox").val().length > 0) {
$(".coveo-query-box-clear").css("display", "block")
} else {
$(".coveo-query-box-clear").css("display", "none")
}
});
$("#brandSearchMB #searchtextbox").keyup(function() {
if ($("#brandSearchMB #searchtextbox").val().length > 0) {
$(".coveo-query-box-clear").css("display", "block")
} else {
$(".coveo-query-box-clear").css("display", "none")
}
});
$(".coveo-query-box-clear").click(function() {
$("#brandSearchDT #searchtextbox").val("");
$("#brandSearchMB #searchtextbox").val("");
$(".coveo-query-box-clear").css("display", "none")
});
var requiredfieldError, pNameAlphaRegex, yNameAlphaRegex, alphaError, yEmailRegex, pEmailRegex, emailError, eMailRegx, alphaRegex, minLenError, maxLenError;
eMailRegx = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
alphaRegex = /^[^!@$%^&*()_+|~=`\\#{}\[\]:";<>?,.\/^\d]*$/;
var emv = $(".email-content");
requiredfieldError = Boolean(emv.data("requirederror")) ? emv.data("requirederror") : "This field is required.";
alphaError = Boolean(emv.data("alphaerror")) ? emv.data("alphaerror") : "Please enter letters only";
emailError = Boolean(emv.data("emailerror")) ? emv.data("emailerror") : "Please provide a valid email address.";
minLenError = Boolean(emv.data("minlenerror")) ? emv.data("minlenerror") : "Please enter at least 3 characters.";
maxLenError = Boolean(emv.data("maxlenerror")) ? emv.data("maxlenerror") : "Please enter no more than 80 characters.";
pNameAlphaRegex = Boolean(emv.data("isrecipientalpha")) ? (IsChecked(emv.data("isrecipientalpha")) ? emv.data("ralpharegex") : alphaRegex) : alphaRegex;
pEmailRegex = Boolean(emv.data("isrecipientemailval")) ? (IsChecked(emv.data("isrecipientemailval")) ? emv.data("remailregex") : eMailRegx) : eMailRegx;
yNameAlphaRegex = Boolean(emv.data("issenderalpha")) ? (IsChecked(emv.data("issenderalpha")) ? emv.data("salpharegex") : alphaRegex) : alphaRegex;
yEmailRegex = Boolean(emv.data("issenderemailval")) ? (IsChecked(emv.data("issenderemailval")) ? emv.data("semailregex") : eMailRegx) : eMailRegx;
var emailThisPageValidator = $("#emailModal").validate({
onkeyup: false,
onclick: false,
rules: {
pName: {
minlength: 3,
maxlength: 80,
required: true,
onlyalphabetspName: true
},
pEmail: {
RecipientEmailValidate: true,
required: true
},
yName: {
minlength: 3,
maxlength: 80,
required: true,
onlyalphabetsyName: true
},
yEmail: {
SenderEmailValidate: true,
required: true
}
},
highlight: function(a) {
$(a).closest(".form-group").addClass("has-error")
},
unhighlight: function(a) {
$(a).closest(".form-group").removeClass("has-error")
},
errorElement: "span",
errorClass: "help-block",
messages: {
pEmail: {
required: emailError,
RecipientEmailValidate: emailError
},
yEmail: {
required: emailError,
SenderEmailValidate: emailError
},
pName: {
required: requiredfieldError,
onlyalphabetspName: alphaError,
minlength: minLenError,
maxlength: maxLenError
},
yName: {
required: requiredfieldError,
onlyalphabetsyName: alphaError,
minlength: minLenError,
maxlength: maxLenError
}
}
});
jQuery.validator.addMethod("onlyalphabetspName", function(a) {
return ValidateByRegex($("#pName").val(), pNameAlphaRegex)
});
jQuery.validator.addMethod("onlyalphabetsyName", function(a) {
return ValidateByRegex($("#yName").val(), yNameAlphaRegex)
});
jQuery.validator.addMethod("SenderEmailValidate", function(a) {
return ValidateByRegex($("#yEmail").val(), yEmailRegex)
});
jQuery.validator.addMethod("RecipientEmailValidate", function(a) {
return ValidateByRegex($("#pEmail").val(), pEmailRegex)
});
function ValidateByRegex(d, a) {
;
var c = d;
var b = new RegExp(a);
if (c.trim() != c) {
return false
} else {
if (!b.test(c)) {
return false
} else {
return true
}
}
}
function IsChecked(a) {
return a.toLowerCase() == "true" ? true : false
}
function sendEmailClick(a) {
var b = $("#emailModal");
b.validate();
if (b.valid()) {
sendEmail(a)
}
}
$(document).ready(function() {
$(".subContent").text($(".subContent").text().replace("{Sender}", ""));
$("#myModalEmail").on("hidden.bs.modal", function() {
$(".email-container").show();
$(".email-success-container").hide();
$("#emailModal").find("input[type=text], textarea").val("");
$("#cbSendCopy").prop("checked", false);
emailThisPageValidator.resetForm()
});
$("#btnSendAnother").click(function(a) {
$(".email-container").show();
$(".email-success-container").hide()
});
$("#btnDone").click(function(a) {
$("#myModalEmail").modal("hide");
$(".email-container").show();
$(".email-success-container").hide()
})
});
function sendEmail(a) {
var b = {
RecipientName: $("#pName").val(),
RecipientEmail: $("#pEmail").val(),
SenderName: $("#yName").val(),
SenderEmail: $("#yEmail").val(),
SendACopy: $("#cbSendCopy").is(":checked"),
SharedUrl: document.URL,
EmailComponentGuid: a
};
document.getElementById("btnSend").disabled = true;
$.ajax({
type: "POST",
url: "/api/form/ShareByEmail/",
data: JSON.stringify(b),
contentType: "application/json; charset=utf-8",
dataType: "json",
asyn: false,
success: function(c) {
if (c === "true") {
$("#recipientName").text($("#pName").val());
$("#recipientEmail").text($("#pEmail").val());
$(".email-container").hide();
$(".email-success-container").show();
$("#emailModal").find("input[type=text], textarea").val("");
$("#cbSendCopy").prop("checked", false);
document.getElementById("btnSend").disabled = false
} else {
alert("Error sending email:" + c)
}
return false
},
error: function(c) {
alert("Error sending email:" + c);
return false
}
})
}(function(a) {
a.fn.unveil = function(j, d) {
var b = a(window),
h = j || 0,
g = window.devicePixelRatio > 1,
c = g ? "data-src-retina" : "data-src",
e = this,
f;
this.one("unveil", function() {
var l = this.getAttribute(c);
l = l || this.getAttribute("data-src");
if (l) {
this.setAttribute("src", l);
if (typeof d === "function") {
d.call(this)
}
}
});
function k() {
var l = e.filter(function() {
var m = a(this);
if (m.is(":hidden")) {
return
}
var q = b.scrollTop(),
p = q + b.height(),
o = m.offset().top,
n = o + m.height();
return n >= q - h && o <= p + h
});
f = l.trigger("unveil");
e = e.not(f)
}
b.on("scroll.unveil resize.unveil lookup.unveil", k);
k();
return this
}
})(window.jQuery || window.Zepto);
(function(f, g) {
var d = f.jQuery || f.Cowboy || (f.Cowboy = {}),
e;
d.throttle = e = function(b, c, n, m) {
var l, a = 0;
if (typeof c !== "boolean") {
m = n;
n = c;
c = g
}
function k() {
var r = this,
p = +new Date() - a,
q = arguments;
function j() {
a = +new Date();
n.apply(r, q)
}
function h() {
l = g
}
if (m && !l) {
j()
}
l && clearTimeout(l);
if (m === g && p > b) {
j()
} else {
if (c !== true) {
l = setTimeout(m ? h : j, m === g ? b - p : b)
}
}
}
if (d.guid) {
k.guid = n.guid = n.guid || d.guid++
}
return k
};
d.debounce = function(a, b, c) {
return c === g ? e(a, b, false) : e(a, c, b !== false)
}
})(this);
jQuery(function(a) {
var c = 250;
var E = 768;
var w = 1070;
var F = window.innerWidth;
var m = a(".ly_header_inner").outerHeight();
var s = a(".bl_headerNav_list_cont").outerHeight();
var p = window.matchMedia("screen and (max-width: 768px)").matches;
function x() {
var G;
if (window.innerWidth >= E && window.innerWidth <= w) {
G = true
} else {
G = false
}
return G
}
function A() {
var G;
if (a("a[href^=#]").length) {
a("a[href^=#]").not(".js_noScroll").each(function() {
a(this).click(function(I) {
var H = a(this);
var J = H.attr("href");
if (H.hasClass("js_pageTop")) {
G = a("body")
} else {
if (J != "#" || J !== "") {
G = a(J)
}
}
if (G.length > 0) {
B(G);
I.preventDefault()
}
})
})
}
}
function B(I) {
var H = I.offset().top;
var G = H - m - s - 20;
a("html, body").animate({
scrollTop: G
}, 550, "swing");
return I
}
function C() {
var J = window.location.search,
G = window.location.hash;
if (!(J.length || G.length)) {
return
}
if (J.length) {
var K = J.slice(1).split("&");
for (var H = 0; H < K.length; H++) {
if (K[H].match(/id=/)) {
G = "#" + (K[H].split("=")[1])
}
}
}
var L = a(G).offset();
if (L != null) {
function I() {
var N = a(G).offset().top;
if (spChecker()) {
var M = N - m - 10
} else {
var M = N - m - 50
}
a("html, body").animate({
scrollTop: M
}, 550, "swing")
}
setTimeout(function() {
I()
}, c)
}
}
function z() {
if (window.pageYOffset > 1) {
a(".js_pageTop").fadeIn(c)
} else {
a(".js_pageTop").fadeOut(c)
}
if (a(window).scrollTop() + a(window).height() >= a(".ly_footer").offset().top) {
a(".js_pageTop").addClass("is_end")
} else {
a(".js_pageTop").removeClass("is_end")
}
}
function q() {
a(".js_lateFadeIn").each(function() {
a("> *", a(this)).each(function() {
var G = a(this);
setTimeout(function() {
G.animate({
opacity: 1
}, c * 8)
}, c * 4)
})
})
}
function y() {
var G = a.Deferred();
t();
m = a(".ly_header").outerHeight();
navHeight = a(".ly_header_inner").outerHeight();
a(".body_inner").css("padding-top", m);
r.adjustContProp();
return G.resolve()
}
function t() {
var G = a(".bl_headerNav_wrapper");
if (!p && G.hasClass("is_spOpen")) {
G.height("auto")
}
}
var r = {
$wrappers: a(".js_megaMenu"),
isFirstExec: true,
expandSp: function() {
this.$wrappers.each(function() {
var G = a(this).find(".js_megaMenu_btn");
var H = a(this).find(".js_megaMenu_cont");
G.off("mouseenter mouseleave");
H.off("mouseenter mouseleave")
})
},
expandPc: function() {
if (document.URL.match("/patient")) {
"use strict";
var H = this;
var G = location.pathname.split("/")[2];
this.$wrappers.each(function() {
var I = a(this).find(".js_megaMenu_btn");
var J = a(this).find(".js_megaMenu_cont");
var P = false;
var L = a(this).find(".navi01");
var K = a(this).find(".navi02");
var M = a(this).find(".navi03");
var N = I.attr("href").split("/")[2];
I.off("click");
function Q(R) {
R.stop().fadeIn(c)
}
function O(R) {
R.stop().fadeOut(c)
}
a(window).on("load", function() {
if (document.URL.match("/plaquenil")) {
Q(L);
L.css("zIndex", 1)
} else {
if (document.URL.match("/admin")) {
Q(K);
K.css("zIndex", 1)
} else {
if (document.URL.match("/qa")) {
Q(M);
M.css("zIndex", 1)
}
}
}
H.isFirstExec = false
});
I.on({
mouseenter: function() {
Q(J)
},
mouseleave: function() {
if (G !== N) {
setTimeout(function() {
if (!P) {
O(J);
if (document.URL.match("/plaquenil")) {
Q(L)
} else {
if (document.URL.match("/dose")) {
Q(K)
} else {
if (document.URL.match("/qa")) {
Q(M)
}
}
}
}
}, 100)
}
}
});
J.on({
mouseenter: function() {
P = true
},
mouseleave: function() {
if (G !== N) {
O(J);
if (document.URL.match("/plaquenil")) {
Q(L)
} else {
if (document.URL.match("/dose")) {
Q(K)
} else {
if (document.URL.match("/qa")) {
Q(M)
}
}
}
P = false
}
}
})
})
} else {
"use strict";
var H = this;
var G = location.pathname.split("/")[1];
this.$wrappers.each(function() {
var I = a(this).find(".js_megaMenu_btn");
var J = a(this).find(".js_megaMenu_cont");
var M = false;
var K = I.attr("href").split("/")[1];
I.off("click");
function N(O) {
O.stop().fadeIn(c)
}
function L(O) {
O.stop().fadeOut(c)
}
a(window).on("load", function() {
if (H.isFirstExec && G === K) {
N(J);
J.css("zIndex", 2);
H.isFirstExec = false
}
});
I.on({
mouseenter: function() {
N(J)
},
mouseleave: function() {
if (G !== K) {
setTimeout(function() {
if (!M) {
L(J)
}
}, 100)
}
}
});
J.on({
mouseenter: function() {
M = true
},
mouseleave: function() {
if (G !== K) {
L(J);
M = false
}
}
})
})
}
},
judgeUseFunc: function() {
if (p) {
this.expandSp()
} else {
this.expandPc()
}
},
adjustContProp: function() {
this.$wrappers.each(function() {
a(this).find(".js_megaMenu_cont").css({
top: navHeight - 1,
width: F
})
})
}
};
function b(H, G) {
H.on({
click: function(I) {
if (H.hasClass("is_active")) {
H.stop().removeClass("is_active");
G.stop().slideUp(c)
} else {
H.stop().addClass("is_active");
G.stop().slideDown(c)
}
I.preventDefault()
}
})
}
var D = {
$btn: a(".js_spMenu_btn"),
$body: a(".js_spMenu_body"),
expand: function() {
b(this.$btn, this.$body);
var G;
a(".js_spMenu_btn").on({
click: function(H) {
if (a("html").hasClass("disable_scroll")) {
a("html").removeClass("disable_scroll");
a(window).scrollTop(G)
} else {
G = a(window).scrollTop();
a("html").addClass("disable_scroll")
}
H.preventDefault()
}
})
},
adjustContProp: function() {
this.$body.css({
top: m
});
if (p) {
this.$body.css({
display: "none"
})
} else {
this.$body.css({
display: "block"
})
}
},
runAll: function() {
this.expand();
this.adjustContProp()
}
};
var h = {
$wrappers: a(".js_accordion"),
exec: function() {
if (this.$wrappers.hasClass("js_accordion__sp")) {
if (p) {
this.$wrappers.each(function() {
var H = a(this).find(".js_accordion_btn").first();
var G = a(this).find(".js_accordion_body").first();
b(H, G)
})
}
} else {
this.$wrappers.each(function() {
var H = a(this).find(".js_accordion_btn").first();
var G = a(this).find(".js_accordion_body").first();
b(H, G)
})
}
},
resetMQ: function() {
if (this.$wrappers.hasClass("js_accordion__sp")) {
this.$wrappers.each(function() {
var H = a(this).find(".js_accordion_btn").first();
var G = a(this).find(".js_accordion_body").first();
if (p) {
G.hide();
b(H, G)
} else {
G.show();
H.off("click")
}
})
} else {
this.$wrappers.each(function() {
var H = a(this).find(".js_accordion_btn").first();
var G = a(this).find(".js_accordion_body").first();
b(H, G)
})
}
}
};
a(function() {
var G = a(".ly_header"),
H = a(window),
I = G.outerHeight(),
J = 0;
H.on("scroll", function() {
var K = a(this).scrollTop();
if (p) {
if (K > J && K > I) {
G.css("top", "-" + I + "px").removeClass("ly_header_none")
} else {
if (K < J && K < I) {
G.css("top", "0")
} else {
if (K < J && (J - K) > 10) {
if (G.hasClass("ly_header_none")) {
G.css("top", "0")
} else {
G.css("top", "-" + I + "px")
}
} else {
G.css("top", "0").addClass("ly_header_none")
}
}
}
J = K
}
})
});
a(document).ready(function() {
var G = a(window).height();
a("body").prepend('');
a("body").prepend('
");
a("#loader-bg ,#loader").height(G)
});
a(window).load(function() {
a("#loader-bg").delay(300).fadeOut(400);
a("#loader").delay(200).fadeOut(200);
a(".body_inner").css("display", "block")
});
a(function() {
setTimeout(function() {
a(".body_inner").css("display", "block");
a("#loader-bg").delay(300).fadeOut(400);
a("#loader").delay(200).fadeOut(200)
}, 10000)
});
function j() {
var I = false;
var H = 3000;
var G = 1000;
a(".bl_fadeImgBlock_img").hide();
a(".bl_fadeImgBlock_img:first").addClass("active").show();
if (I) {
setInterval(function() {
var J = a(".bl_fadeImgBlock_img.active");
var K = J.next(".bl_fadeImgBlock_img").length ? J.next(".bl_fadeImgBlock_img") : a(".bl_fadeImgBlock_img:first");
J.fadeOut(G).removeClass("active");
K.fadeIn(G).addClass("active")
}, H)
}
}
function k() {
var G = a(".bl_fadeImgBlock_img:first").height();
a(".bl_fadeImgBlock").css({
height: G
})
}
var n = "";
var n = a(".el_footerInfo_ID_txt").text();
a(".bl_footerInfo_info_ID").prepend(n);
a(".js_social_popup").each(function() {
var G = "menubar=0,width=600,height=500";
a(this).on("click", function() {
var H = a(this).attr("href");
if (a(this).hasClass("is_twitter")) {} else {
if (a(this).hasClass("is_facebook")) {} else {
if (a(this).hasClass("is_facebook")) {}
}
}
window.open(H, "_blank", G);
return false
})
});
a(".modal-content").each(function() {
var G = a(".modal-footer", this);
if ((a(this).find(".modal-content_note")).length) {
var H = a(".modal-body .modal-content_note", this);
G.after(H)
}
});
a(".bl_motionPanel_inner li").each(function() {
var H = a("> a > div", this);
var G = a(".bl_motionPanel_inner_slide", this);
var I = G.attr("href");
H.on("click", function() {
location.href = I
});
G.on("click", function() {
return false
})
});
a(".bl_toggleBlock").each(function() {
var H = a(".bl_toggleBlock_ttl", this);
var G = a(".bl_toggleBlock_cont", this);
G.hide();
H.on("click", function() {
H.toggleClass("is_active");
G.slideToggle().toggleClass("is_active")
})
});
function l(G, J) {
if (!J) {
J = window.location.href
}
G = G.replace(/[\[\]]/g, "\\$&");
var H = new RegExp("[?&]" + G + "(=([^]*)|&|#|$)"),
I = H.exec(J);
if (!I) {
return null
}
if (!I[2]) {
return ""
}
return decodeURIComponent(I[2].replace(/\+/g, " "))
}
// var f = "patient";
// var v = location.href;
// var u = location.pathname;
// var d = u.match(f);
// var o = l("rdtgt");
// if (v.match("/patient")) {
// if (!v.match("/patient/disclaimer")) {
// var e = a.cookie("disclaimer");
// if (e) {
// o == "gankamap_pc" ? location.href = "https://map.sanofi-sle.jp/p/gankamap/" : "";
// o == "gankamap_sp" ? location.href = "https://map.sanofi-sle.jp/smt/gankamap/" : ""
// } else {
// if (o !== null) {
// o == "gankamap_pc" ? location.href = "/patient/disclaimer?rdtgt=gankamap_pc" : "";
// o == "gankamap_sp" ? location.href = "/patient/disclaimer?rdtgt=gankamap_sp" : ""
// } else {
// query_url = v.replace(/\?.*$/, "");
// location.href = "/patient/disclaimer"
// }
// }
// }
// }
// a(".patient_btn .patient_disclaimer").on("click", function() {
// a.cookie("disclaimer", true, {
// expires: 365
// });
// url = l("url");
// if (url) {
// location.href = url
// } else {
// if (o !== null) {
// o == "gankamap_pc" ? location.href = "https://map.sanofi-sle.jp/p/gankamap/" : "";
// o == "gankamap_sp" ? location.href = "https://map.sanofi-sle.jp/smt/gankamap/" : ""
// } else {
// location.href = "/patient/"
// }
// }
// });
function g() {
a.fn.matchHeight._maintainScroll = true;
var G = [".js_matchHeight", ".js_matchHeight02", ".js_matchHeight03", ".js_matchHeight04", ".js_matchHeight05"];
a.each(G, function(H, I) {
a(I).matchHeight()
});
a.fn.matchHeight._update()
}
a(function() {
g();
r.judgeUseFunc();
D.runAll();
h.exec();
A();
a("a.boxer").magnificPopup({
removalDelay: 300,
mainClass: "mfp-fade",
type: "image"
})
});
a(window).on("load", function() {
q();
k();
j();
y().then(C());
var J = a(location).attr("href");
if (J.indexOf("#") != -1) {
var G = J.split("#");
var I = a("#" + G[G.length - 1]);
if (I.length) {
var H = Math.floor(I.offset().top) - m - s - 30;
a("html, body").animate({
scrollTop: H
}, 0)
}
}
a(window).on("scroll", function() {
z()
});
a(window).on("resize", a.throttle(500, function() {
if (F !== window.innerWidth) {
F = window.innerWidth;
p = window.matchMedia("screen and (max-width: 768px)").matches;
r.judgeUseFunc();
k();
y();
h.resetMQ();
D.adjustContProp()
}
}))
})
});
! function(a) {
"function" == typeof define && define.amd ? define(["jquery"], a) : "undefined" != typeof module && module.exports ? module.exports = a(require("jquery")) : a(jQuery)
}(function(k) {
var c = -1,
g = -1,
d = function(a) {
return parseFloat(a) || 0
},
b = function(m) {
var q = 1,
l = k(m),
p = null,
s = [];
return l.each(function() {
var o = k(this),
n = o.offset().top - d(o.css("margin-top")),
r = s.length > 0 ? s[s.length - 1] : null;
null === r ? s.push(o) : Math.floor(Math.abs(p - n)) <= q ? s[s.length - 1] = r.add(o) : s.push(o), p = n
}), s
},
f = function(a) {
var l = {
byRow: !0,
property: "height",
target: null,
remove: !1
};
return "object" == typeof a ? k.extend(l, a) : ("boolean" == typeof a ? l.byRow = a : "remove" === a && (l.remove = !0), l)
},
h = k.fn.matchHeight = function(a) {
var m = f(a);
if (m.remove) {
var l = this;
return this.css(m.property, ""), k.each(h._groups, function(o, n) {
n.elements = n.elements.not(l)
}), this
}
return this.length <= 1 && !m.target ? this : (h._groups.push({
elements: this,
options: m
}), h._apply(this, m), this)
};
h.version = "0.7.0", h._groups = [], h._throttle = 80, h._maintainScroll = !1, h._beforeUpdate = null, h._afterUpdate = null, h._rows = b, h._parse = d, h._parseOptions = f, h._apply = function(n, t) {
var v = f(t),
q = k(n),
r = [q],
a = k(window).scrollTop(),
u = k("html").outerHeight(!0),
m = q.parents().filter(":hidden");
return m.each(function() {
var l = k(this);
l.data("style-cache", l.attr("style"))
}), m.css("display", "block"), v.byRow && !v.target && (q.each(function() {
var l = k(this),
p = l.css("display");
"inline-block" !== p && "flex" !== p && "inline-flex" !== p && (p = "block"), l.data("style-cache", l.attr("style")), l.css({
display: p,
"padding-top": "0",
"padding-bottom": "0",
"margin-top": "0",
"margin-bottom": "0",
"border-top-width": "0",
"border-bottom-width": "0",
height: "100px",
overflow: "hidden"
})
}), r = b(q), q.each(function() {
var l = k(this);
l.attr("style", l.data("style-cache") || "")
})), k.each(r, function(p, w) {
var l = k(w),
s = 0;
if (v.target) {
s = v.target.outerHeight(!1)
} else {
if (v.byRow && l.length <= 1) {
return void l.css(v.property, "")
}
l.each(function() {
var y = k(this),
A = y.attr("style"),
z = y.css("display");
"inline-block" !== z && "flex" !== z && "inline-flex" !== z && (z = "block");
var x = {
display: z
};
x[v.property] = "", y.css(x), y.outerHeight(!1) > s && (s = y.outerHeight(!1)), A ? y.attr("style", A) : y.css("display", "")
})
}
l.each(function() {
var x = k(this),
y = 0;
v.target && x.is(v.target) || ("border-box" !== x.css("box-sizing") && (y += d(x.css("border-top-width")) + d(x.css("border-bottom-width")), y += d(x.css("padding-top")) + d(x.css("padding-bottom"))), x.css(v.property, s - y + "px"))
})
}), m.each(function() {
var l = k(this);
l.attr("style", l.data("style-cache") || null)
}), h._maintainScroll && k(window).scrollTop(a / u * k("html").outerHeight(!0)), this
}, h._applyDataApi = function() {
var a = {};
k("[data-match-height], [data-mh]").each(function() {
var l = k(this),
e = l.attr("data-mh") || l.attr("data-match-height");
e in a ? a[e] = a[e].add(l) : a[e] = l
}), k.each(a, function() {
this.matchHeight(!0)
})
};
var j = function(a) {
h._beforeUpdate && h._beforeUpdate(a, h._groups), k.each(h._groups, function() {
h._apply(this.elements, this.options)
}), h._afterUpdate && h._afterUpdate(a, h._groups)
};
h._update = function(l, e) {
if (e && "resize" === e.type) {
var m = k(window).width();
if (m === c) {
return
}
c = m
}
l ? -1 === g && (g = setTimeout(function() {
j(e), g = -1
}, h._throttle)) : j(e)
}, k(h._applyDataApi), k(window).bind("load", function(a) {
h._update(!1, a)
}), k(window).bind("resize orientationchange", function(a) {
h._update(!0, a)
})
});
if ("undefined" == typeof jQuery) {
throw new Error("Bootstrap's JavaScript requires jQuery")
} + function(b) {}(jQuery) + function(d) {
var e = function(a, g) {
this.options = g, this.$element = d(a), this.$backdrop = this.isShown = null, this.options.remote && this.$element.find(".modal-content").load(this.options.remote, d.proxy(function() {
this.$element.trigger("loaded.bs.modal")
}, this))
};
e.DEFAULTS = {
backdrop: !0,
keyboard: !0,
show: !0
}, e.prototype.toggle = function(b) {
return this[this.isShown ? "hide" : "show"](b)
}, e.prototype.show = function(a) {
var g = this,
h = d.Event("show.bs.modal", {
relatedTarget: a
});
this.$element.trigger(h), this.isShown || h.isDefaultPrevented() || (this.isShown = !0, this.escape(), this.$element.on("click.dismiss.bs.modal", '[data-dismiss="modal"]', d.proxy(this.hide, this)), this.backdrop(function() {
var b = d.support.transition && g.$element.hasClass("fade");
g.$element.parent().length || g.$element.appendTo(document.body), g.$element.show().scrollTop(0), b && g.$element[0].offsetWidth, g.$element.addClass("in").attr("aria-hidden", !1), g.enforceFocus();
var c = d.Event("shown.bs.modal", {
relatedTarget: a
});
b ? g.$element.find(".modal-dialog").one(d.support.transition.end, function() {
g.$element.focus().trigger(c)
}).emulateTransitionEnd(300) : g.$element.focus().trigger(c)
}))
}, e.prototype.hide = function(a) {
a && a.preventDefault(), a = d.Event("hide.bs.modal"), this.$element.trigger(a), this.isShown && !a.isDefaultPrevented() && (this.isShown = !1, this.escape(), d(document).off("focusin.bs.modal"), this.$element.removeClass("in").attr("aria-hidden", !0).off("click.dismiss.bs.modal"), d.support.transition && this.$element.hasClass("fade") ? this.$element.one(d.support.transition.end, d.proxy(this.hideModal, this)).emulateTransitionEnd(300) : this.hideModal())
}, e.prototype.enforceFocus = function() {
d(document).off("focusin.bs.modal").on("focusin.bs.modal", d.proxy(function(b) {
this.$element[0] === b.target || this.$element.has(b.target).length || this.$element.focus()
}, this))
}, e.prototype.escape = function() {
this.isShown && this.options.keyboard ? this.$element.on("keyup.dismiss.bs.modal", d.proxy(function(b) {
27 == b.which && this.hide()
}, this)) : this.isShown || this.$element.off("keyup.dismiss.bs.modal")
}, e.prototype.hideModal = function() {
var b = this;
this.$element.hide(), this.backdrop(function() {
b.removeBackdrop(), b.$element.trigger("hidden.bs.modal")
})
}, e.prototype.removeBackdrop = function() {
this.$backdrop && this.$backdrop.remove(), this.$backdrop = null
}, e.prototype.backdrop = function(a) {
var g = this.$element.hasClass("fade") ? "fade" : "";
if (this.isShown && this.options.backdrop) {
var h = d.support.transition && g;
if (this.$backdrop = d('
').appendTo(document.body), this.$element.on("click.dismiss.bs.modal", d.proxy(function(b) {
b.target === b.currentTarget && ("static" == this.options.backdrop ? this.$element[0].focus.call(this.$element[0]) : this.hide.call(this))
}, this)), h && this.$backdrop[0].offsetWidth, this.$backdrop.addClass("in"), !a) {
return
}
h ? this.$backdrop.one(d.support.transition.end, a).emulateTransitionEnd(150) : a()
} else {
!this.isShown && this.$backdrop ? (this.$backdrop.removeClass("in"), d.support.transition && this.$element.hasClass("fade") ? this.$backdrop.one(d.support.transition.end, a).emulateTransitionEnd(150) : a()) : a && a()
}
};
var f = d.fn.modal;
d.fn.modal = function(a, b) {
return this.each(function() {
var c = d(this),
h = c.data("bs.modal"),
j = d.extend({}, e.DEFAULTS, c.data(), "object" == typeof a && a);
h || c.data("bs.modal", h = new e(this, j)), "string" == typeof a ? h[a](b) : j.show && h.show(b)
})
}, d.fn.modal.Constructor = e, d.fn.modal.noConflict = function() {
return d.fn.modal = f, this
}, d(document).on("click.bs.modal.data-api", '[data-toggle="modal"]', function(a) {
var g = d(this),
h = g.attr("href"),
j = d(g.attr("data-target") || h && h.replace(/.*(?=#[^\s]+$)/, "")),
k = j.data("bs.modal") ? "toggle" : d.extend({
remote: !/#/.test(h) && h
}, j.data(), g.data());
g.is("a") && a.preventDefault(), j.modal(k, this).one("hide", function() {
g.is(":visible") && g.focus()
})
}), d(document).on("show.bs.modal", ".modal", function() {
d(document.body).addClass("modal-open")
}).on("hidden.bs.modal", ".modal", function() {
d(document.body).removeClass("modal-open")
})
}(jQuery);
/*
* jQuery Cookie Plugin v1.4.1
* https://github.com/carhartl/jquery-cookie
*
* Copyright 2006, 2014 Klaus Hartl
* Released under the MIT license
*/
(function(a) {
if (typeof define === "function" && define.amd) {
define(["jquery"], a)
} else {
if (typeof exports === "object") {
module.exports = a(require("jquery"))
} else {
a(jQuery)
}
}
}(function(a) {
var f = /\+/g;
function d(j) {
return b.raw ? j : encodeURIComponent(j)
}
function c(j) {
return b.raw ? j : decodeURIComponent(j)
}
function h(j) {
return d(b.json ? JSON.stringify(j) : String(j))
}
function e(k) {
if (k.indexOf('"') === 0) {
k = k.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, "\\")
}
try {
k = decodeURIComponent(k.replace(f, " "));
return b.json ? JSON.parse(k) : k
} catch (j) {}
}
function g(k, j) {
var l = b.raw ? k : e(k);
return a.isFunction(j) ? j(l) : l
}
var b = a.cookie = function(o, w, r) {
if (arguments.length > 1 && !a.isFunction(w)) {
r = a.extend({}, b.defaults, r);
if (typeof r.expires === "number") {
var m = r.expires,
v = r.expires = new Date();
v.setMilliseconds(v.getMilliseconds() + m * 86400000)
}
return (document.cookie = [d(o), "=", h(w), r.expires ? "; expires=" + r.expires.toUTCString() : "", r.path ? "; path=" + r.path : "", r.domain ? "; domain=" + r.domain : "", r.secure ? "; secure" : ""].join(""))
}
var u = o ? undefined : {},
k = document.cookie ? document.cookie.split("; ") : [],
n = 0,
p = k.length;
for (; n < p; n++) {
var s = k[n].split("="),
q = c(s.shift()),
j = s.join("=");
if (o === q) {
u = g(j, w);
break
}
if (!o && (j = g(j)) !== undefined) {
u[q] = j
}
}
return u
};
b.defaults = {};
a.removeCookie = function(j, k) {
a.cookie(j, "", a.extend({}, k, {
expires: -1
}));
return !a.cookie(j)
}
}));