// dropdown
function checkcaptchamath() {
// Optional: Show a waiting message in the layer with ID login_response
document.getElementById('captcha_response').innerHTML = ""
// Required: verify that all fileds is not empty. Use encodeURI() to solve some issues about character encoding.
var scode= encodeURI(document.getElementById('security_code').value);
var firstNumber= encodeURI(document.getElementById('firstNumber').value);
var secondNumber= encodeURI(document.getElementById('secondNumber').value);
var answer=parseInt(firstNumber)+parseInt(secondNumber);
if(scode!='' && scode==answer)
{
document.getElementById('captcha_response').innerHTML = '';
}
else
{
document.getElementById('captcha_response').innerHTML = '
Incorrect Captcha Sum
';
document.getElementById('security_code').value="";
}
}
$(document).ready(function() {
$('p:empty').remove();
$('p:empty').filter(function() {
return $(this).html().trim() === ' ';
}).remove();
});
$(document).ready(function() {
$('p').filter(function() {
return $(this).html().trim() === ' ';
}).remove();
});
$(document).ready(function() {
// Sponser ticker
$('.inner-content-sponsers .ticker').easyTicker({
direction: 'up',
easing: 'swing',
speed: 'slow',
interval: 2000,
height: 'auto',
visible: 4,
mousePause: 4,
controls: {
up: '',
down: '',
toggle: '',
playText: 'Play',
stopText: 'Stop'
}
});
$('.ticker').easyTicker({
direction: 'up',
easing: 'swing',
speed: 'slow',
interval: 2000,
height: 'auto',
visible: 2,
mousePause: 2,
controls: {
up: '',
down: '',
toggle: '',
playText: 'Play',
stopText: 'Stop'
}
});
});
$(document).ready(function() {
$.validator.addMethod("validate_email", function(value, element) {
if (/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(value)) {
return true;
} else {
return false;
}
}, "Please enter a valid Email.");
// Initialize Magnific Popup
$('#video-gallery').magnificPopup({
delegate: 'a',
type: 'iframe',
iframe: {
patterns: {
youtube: {
index: 'youtu',
id: function(url) {
// Extract video ID from URL
var match = url.match(/[^\w-]([-\w]{11})[^-\w]?/);
if (match && match[1]) {
return match[1];
}
},
src: 'https://www.youtube.com/embed/%id%?autoplay=1'
},
vimeo: {
index: 'vimeo.com/',
id: '/',
src: 'https://player.vimeo.com/video/%id%?autoplay=1'
}
// Add more patterns for other video platforms if needed
}
},
gallery: {
enabled: true
}
});
});
// $(document).ready(function() {
// $("form button").prop("disabled", true);
// });
$(document).ready(function () {
if ($(window).width() < 992) {
$("a.nav-link1").each(function () {
$(this).find("span.submenu-indicator").insertAfter($(this));
});
$(".submenu-indicator").click(function () {
$(this).closest("li.nav-item1").toggleClass("focus");
});
}
});
$(document).ready(function($)
{
$.validator.addMethod("customPhone", function (value, element) {
// Modify this regular expression to match your desired phone number format
return this.optional(element) || /^\d{10}$/.test(value);
}, "Please enter a valid phone number");
$('.numberkey').on('input', function() {
var inputVal = $(this).val();
$(this).val(inputVal.replace(/\D/g, ''));
});
// $('label').on('click', function(event) {
// event.preventDefault();
// });
// Add custom method for mobile number validation
$.validator.addMethod("phone", function(value, element) {
// Modify this regex pattern according to your desired mobile number format
var mobilePattern = /^[0-9]{10}$/;
return this.optional(element) || mobilePattern.test(value);
}, "Please enter a valid mobile number.");
});
// MEGA MENU CODE
!(function (n, i, e, a) {
(n.navigation = function (t, s) {
var o = {
responsive: !0,
mobileBreakpoint: 991,
showDuration: 0,
hideDuration: 0,
showDelayDuration: 0,
hideDelayDuration: 0,
submenuTrigger: "hover",
effect: "fadeIn",
submenuIndicator: !0,
submenuIndicatorTrigger: !1,
hideSubWhenGoOut: !0,
visibleSubmenusOnMobile: !1,
fixed: !1,
overlay: !0,
overlayColor: "rgba(0, 0, 0, 0.5)",
hidden: !1,
hiddenOnMobile: !1,
offCanvasSide: "left",
offCanvasCloseButton: !0,
animationOnShow: "",
animationOnHide: "",
onInit: function () {},
onLandscape: function () {},
onPortrait: function () {},
onShowOffCanvas: function () {},
onHideOffCanvas: function () {},
},
r = this,
u = Number.MAX_VALUE,
d = 1,
l = "click.nav touchstart.nav",
f = "mouseenter focusin",
c = "mouseleave focusout";
r.settings = {};
var t = (n(t), t);
n(t).find(".nav-search").length > 0 &&
n(t)
.find(".nav-search")
.find("form")
.prepend(
"✕"
),
(r.init = function () {
(r.settings = n.extend({}, o, s)),
r.settings.offCanvasCloseButton &&
n(t)
.find(".nav-menus-wrapper")
.prepend(
""
),
"right" == r.settings.offCanvasSide &&
n(t)
.find(".nav-menus-wrapper")
.addClass("nav-menus-wrapper-right"),
r.settings.hidden &&
(n(t).addClass("navigation-hidden"),
(r.settings.mobileBreakpoint = 99999)),
v(),
r.settings.fixed && n(t).addClass("navigation-fixed"),
n(t)
.find(".nav-toggle")
.on("click touchstart", function (n) {
n.stopPropagation(),
n.preventDefault(),
r.showOffcanvas(),
s !== a && r.callback("onShowOffCanvas");
}),
n(t)
.find(".nav-menus-wrapper-close-button")
.on("click touchstart", function () {
r.hideOffcanvas(),
s !== a && r.callback("onHideOffCanvas");
}),
n(t)
.find(".nav-search-button, .nav-search-close-button")
.on("click touchstart keydown", function (i) {
i.stopPropagation(), i.preventDefault();
var e = i.keyCode || i.which;
"click" === i.type ||
"touchstart" === i.type ||
("keydown" === i.type && 13 == e)
? r.toggleSearch()
: 9 == e && n(i.target).blur();
}),
n(t).find(".megamenu-tabs").length > 0 && y(),
n(i).resize(function () {
r.initNavigationMode(C()),
O(),
r.settings.hiddenOnMobile && m();
}),
r.initNavigationMode(C()),
r.settings.hiddenOnMobile && m(),
s !== a && r.callback("onInit");
});
var h = function () {
n(t).find(".nav-submenu").hide(0),
n(t).find("li").removeClass("focus");
},
v = function () {
n(t)
.find("li")
.each(function () {
n(this).children(".nav-dropdown,.megamenu-panel")
.length > 0 &&
(n(this)
.children(".nav-dropdown,.megamenu-panel")
.addClass("nav-submenu"),
r.settings.submenuIndicator &&
n(this)
.children("a")
.append(
""
));
});
},
m = function () {
n(t).hasClass("navigation-portrait")
? n(t).addClass("navigation-hidden")
: n(t).removeClass("navigation-hidden");
};
(r.showSubmenu = function (i, e) {
C() > r.settings.mobileBreakpoint &&
n(t).find(".nav-search").find("form").fadeOut(),
"fade" == e
? n(i)
.children(".nav-submenu")
.stop(!0, !0)
.delay(r.settings.showDelayDuration)
.fadeIn(r.settings.showDuration)
.removeClass(r.settings.animationOnHide)
.addClass(r.settings.animationOnShow)
: n(i)
.children(".nav-submenu")
.stop(!0, !0)
.delay(r.settings.showDelayDuration)
.slideDown(r.settings.showDuration)
.removeClass(r.settings.animationOnHide)
.addClass(r.settings.animationOnShow),
n(i).addClass("focus");
}),
(r.hideSubmenu = function (i, e) {
"fade" == e
? n(i)
.find(".nav-submenu")
.stop(!0, !0)
.delay(r.settings.hideDelayDuration)
.fadeOut(r.settings.hideDuration)
.removeClass(r.settings.animationOnShow)
.addClass(r.settings.animationOnHide)
: n(i)
.find(".nav-submenu")
.stop(!0, !0)
.delay(r.settings.hideDelayDuration)
.slideUp(r.settings.hideDuration)
.removeClass(r.settings.animationOnShow)
.addClass(r.settings.animationOnHide),
n(i)
.removeClass("focus")
.find(".focus")
.removeClass("focus");
});
var p = function () {
n("body").addClass("no-scroll"),
r.settings.overlay &&
(n(t).append(""),
n(t)
.find(".nav-overlay-panel")
.css("background-color", r.settings.overlayColor)
.fadeIn(300)
.on("click touchstart", function (n) {
r.hideOffcanvas();
}));
},
g = function () {
n("body").removeClass("no-scroll"),
r.settings.overlay &&
n(t)
.find(".nav-overlay-panel")
.fadeOut(400, function () {
n(this).remove();
});
};
(r.showOffcanvas = function () {
p(),
"left" == r.settings.offCanvasSide
? n(t)
.find(".nav-menus-wrapper")
.css("transition-property", "left")
.addClass("nav-menus-wrapper-open")
: n(t)
.find(".nav-menus-wrapper")
.css("transition-property", "right")
.addClass("nav-menus-wrapper-open");
}),
(r.hideOffcanvas = function () {
n(t)
.find(".nav-menus-wrapper")
.removeClass("nav-menus-wrapper-open")
.on(
"webkitTransitionEnd moztransitionend transitionend oTransitionEnd",
function () {
n(t)
.find(".nav-menus-wrapper")
.css("transition-property", "none")
.off();
}
),
g();
}),
(r.toggleOffcanvas = function () {
C() <= r.settings.mobileBreakpoint &&
(n(t)
.find(".nav-menus-wrapper")
.hasClass("nav-menus-wrapper-open")
? (r.hideOffcanvas(),
s !== a && r.callback("onHideOffCanvas"))
: (r.showOffcanvas(),
s !== a && r.callback("onShowOffCanvas")));
}),
(r.toggleSearch = function () {
"none" == n(t).find(".nav-search").find("form").css("display")
? (n(t).find(".nav-search").find("form").fadeIn(200),
n(t).find(".nav-search").find("input").focus())
: (n(t).find(".nav-search").find("form").fadeOut(200),
n(t).find(".nav-search").find("input").blur());
}),
(r.initNavigationMode = function (i) {
r.settings.responsive
? (i <= r.settings.mobileBreakpoint &&
u > r.settings.mobileBreakpoint &&
(n(t)
.addClass("navigation-portrait")
.removeClass("navigation-landscape"),
S(),
s !== a && r.callback("onPortrait")),
i > r.settings.mobileBreakpoint &&
d <= r.settings.mobileBreakpoint &&
(n(t)
.addClass("navigation-landscape")
.removeClass("navigation-portrait"),
k(),
g(),
r.hideOffcanvas(),
s !== a && r.callback("onLandscape")),
(u = i),
(d = i))
: (n(t).addClass("navigation-landscape"),
k(),
s !== a && r.callback("onLandscape"));
});
var b = function () {
n("html").on("click.body touchstart.body", function (i) {
0 === n(i.target).closest(".navigation").length &&
(n(t).find(".nav-submenu").fadeOut(),
n(t).find(".focus").removeClass("focus"),
n(t).find(".nav-search").find("form").fadeOut());
});
},
C = function () {
return (
i.innerWidth ||
e.documentElement.clientWidth ||
e.body.clientWidth
);
},
w = function () {
n(t).find(".nav-menu").find("li, a").off(l).off(f).off(c);
},
O = function () {
if (C() > r.settings.mobileBreakpoint) {
var i = n(t).outerWidth(!0);
n(t)
.find(".nav-menu")
.children("li")
.children(".nav-submenu")
.each(function () {
n(this).parent().position().left +
n(this).outerWidth() >
i
? n(this).css("right", 0)
: n(this).css("right", "auto");
});
}
},
y = function () {
function i(i) {
var e = n(i).children(".megamenu-tabs-nav").children("li"),
a = n(i).children(".megamenu-tabs-pane");
n(e).on("click.tabs touchstart.tabs", function (i) {
i.stopPropagation(),
i.preventDefault(),
n(e).removeClass("active"),
n(this).addClass("active"),
n(a).hide(0).removeClass("active"),
n(a[n(this).index()]).show(0).addClass("active");
});
}
if (n(t).find(".megamenu-tabs").length > 0)
for (
var e = n(t).find(".megamenu-tabs"), a = 0;
a < e.length;
a++
)
i(e[a]);
},
k = function () {
w(),
h(),
navigator.userAgent.match(/Mobi/i) ||
navigator.maxTouchPoints > 0 ||
"click" == r.settings.submenuTrigger
? n(t)
.find(".nav-menu, .nav-dropdown")
.children("li")
.children("a")
.on(l, function (e) {
if (
(r.hideSubmenu(
n(this).parent("li").siblings("li"),
r.settings.effect
),
n(this)
.closest(".nav-menu")
.siblings(".nav-menu")
.find(".nav-submenu")
.fadeOut(r.settings.hideDuration),
n(this).siblings(".nav-submenu").length >
0)
) {
if (
(e.stopPropagation(),
e.preventDefault(),
"none" ==
n(this)
.siblings(".nav-submenu")
.css("display"))
)
return (
r.showSubmenu(
n(this).parent("li"),
r.settings.effect
),
O(),
!1
);
if (
(r.hideSubmenu(
n(this).parent("li"),
r.settings.effect
),
"_blank" === n(this).attr("target") ||
"blank" ===
n(this).attr("target"))
)
i.open(n(this).attr("href"));
else {
if (
"#" === n(this).attr("href") ||
"" === n(this).attr("href") ||
"javascript:void(0)" ===
n(this).attr("href")
)
return !1;
i.location.href =
n(this).attr("href");
}
}
})
: n(t)
.find(".nav-menu")
.find("li")
.on(f, function () {
r.showSubmenu(this, r.settings.effect), O();
})
.on(c, function () {
r.hideSubmenu(this, r.settings.effect);
}),
r.settings.hideSubWhenGoOut && b();
},
S = function () {
w(),
h(),
r.settings.visibleSubmenusOnMobile
? n(t).find(".nav-submenu").show(0)
: (n(t)
.find(".submenu-indicator")
.removeClass("submenu-indicator-up"),
r.settings.submenuIndicator &&
r.settings.submenuIndicatorTrigger
? n(t)
.find(".submenu-indicator")
.on(l, function (i) {
return (
i.stopPropagation(),
i.preventDefault(),
r.hideSubmenu(
n(this)
.parent("span")
.parent("a")
.siblings("a"),
"slide"
),
r.hideSubmenu(
n(this)
.closest(".nav-menu")
.siblings(".nav-menu")
.children("a"),
"slide"
),
"none" ==
n(this)
.parent("a")
.siblings(".nav-submenu")
.css("display")
? (n(this).addClass(
"submenu-indicator-up"
),
n(this)
.parent("span")
.parent("a")
.siblings("a")
.find(
".submenu-indicator"
)
.removeClass(
"submenu-indicator-up"
),
n(this)
.closest(".nav-menu")
.siblings(".nav-menu")
.find(
".submenu-indicator"
)
.removeClass(
"submenu-indicator-up"
),
r.showSubmenu(
n(this)
.parent("span")
.parent("a"),
"slide"
),
!1)
: (n(this)
.parent("span")
.parent("a")
.find(
".submenu-indicator"
)
.removeClass(
"submenu-indicator-up"
),
void r.hideSubmenu(
n(this)
.parent("span")
.parent("a"),
"slide"
))
);
})
: n(t)
.find(".nav-menu, .nav-dropdown")
.children("a")
.children("span")
.on(l, function (e) {
if (
(e.stopPropagation(),
e.preventDefault(),
r.hideSubmenu(
n(this)
.parent("a")
.siblings("a"),
r.settings.effect
),
r.hideSubmenu(
n(this)
.closest(".nav-menu")
.siblings(".nav-menu")
.children("a"),
"slide"
),
"none" ==
n(this)
.siblings(".nav-submenu")
.css("display"))
)
return (
n(this)
.children(
".submenu-indicator"
)
.addClass(
"submenu-indicator-up"
),
n(this)
.parent("a")
.siblings("a")
.find(".submenu-indicator")
.removeClass(
"submenu-indicator-up"
),
n(this)
.closest(".nav-menu")
.siblings(".nav-menu")
.find(".submenu-indicator")
.removeClass(
"submenu-indicator-up"
),
r.showSubmenu(
n(this).parent("a"),
"slide"
),
!1
);
if (
(n(this)
.parent("a")
.find(".submenu-indicator")
.removeClass(
"submenu-indicator-up"
),
r.hideSubmenu(
n(this).parent("a"),
"slide"
),
"_blank" ===
n(this).attr("target") ||
"blank" ===
n(this).attr("target"))
)
i.open(n(this).attr("href"));
else {
if (
"#" === n(this).attr("href") ||
"" === n(this).attr("href") ||
"javascript:void(0)" ===
n(this).attr("href")
)
return !1;
i.location.href =
n(this).attr("href");
}
}));
};
(r.callback = function (n) {
s[n] !== a && s[n].call(t);
}),
r.init();
}),
(n.fn.navigation = function (i) {
return this.each(function () {
if (a === n(this).data("navigation")) {
var e = new n.navigation(this, i);
n(this).data("navigation", e);
}
});
});
})(jQuery, window, document);
(function ($) {
"use strict";
var $window = $(window);
if ($.fn.navigation) {
$("#navigation1").navigation();
$("#always-hidden-nav").navigation({
hidden: true,
});
}
})(jQuery);
$(document).ready(function() {
// Custom validation method for Zelle reference numbers using regex
$.validator.addMethod("zelleReference", function(value, element) {
return this.optional(element) || /^[A-Za-z0-9\-]+$/.test(value);
}, "Must be a valid Zelle reference number");
$.validator.addMethod("validate_email", function(value, element) {
if (/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(value)) {
return true;
} else {
return false;
}
}, "Please enter a valid Email.");
$.validator.addMethod('filesize', function (value, element, param) {
return this.optional(element) || (element.files[0].size <= param * 1000000)
}, 'File size must be less than {0} MB');
$.validator.addMethod("alpha2",function(t,e){
return this.optional(e)||t==t.match(/^[a-zA-Z\s]+$/)},"Invalid");
});
$(document).ready(function() {
$('input[type="text"], input[type="email"], input[type="password"]').change(function(){
s = $.trim(this.value);
s= $( $.parseHTML(s)).text();
this.value=s;
});
});