jQuery(function ($){
$(document).ready(()=> {
var now=new Date();
let $copyDate=$('span#copy-date')
$copyDate.text(now.getFullYear());
}
);
});
jQuery(function ($){
$(document).ready(()=> {
if($('.menu-search')){
let $menuSearch=$('.menu-search>a');
$menuSearch.html(`<i class="feather-search"></i>`);
$('.menu-search').css('visibility','visible');
}});
});
jQuery(function ($){
$(document).ready(()=> {
let $droupdown=$('.has-droupdown>a');
let $screenWidth=null;
let $mobile=null;
let isMobile=()=>{
$screenWidth=$(window).width();
$mobile=$screenWidth < 992;
return $mobile;
};
isMobile();
$(window).resize((e)=>{
let $droupEvents=$._data($('.has-droupdown>a')[0], 'events');
if(isMobile()){
if($('#header-wrapper').hasClass('menu-open')){
$('.close-menu').trigger('click');
}
if($droupEvents!=undefined&&($droupEvents.click.length > 0)){
}else{
$droupdown.on('click', function (e){
e.preventDefault();
$(this).siblings('.submenu').slideToggle('400');
$(this).toggleClass('open').siblings('.submenu').toggleClass('active');
});
}}else{
if($droupEvents!=undefined&&($droupEvents.click.length > 0)){
$droupdown
.off('click')
.siblings('.submenu').attr('style','');
}}
});
});
});
jQuery(function ($){
$(document).ready(()=> {
if($('.single.single-post .category-video iframe')){
let query=location.search
query=query.replace('?','');
let key=query.split('=')[0]
let val=query.split('=')[1]
let q={video:val};
let $frame=$('#youtube-video>iframe');
let $header=$('header.header-area')
if(q.video=="play"){
let oldSrc=$frame.attr('src');
let newSrc=oldSrc.replace('autoplay=0','autoplay=1');
$frame.attr('src',newSrc);
$('html, body').animate({
scrollTop: $frame.offset().top - $header.outerHeight()
}, 1000,'swing');
}}
});
});
jQuery(function ($){
$(document).ready(()=> {
if($('body.blog:not(body.search)')){
let path=location.search
let $searchFilter=$('#news-search-filter');
let $header=$('header.header-area')
if(path.includes('?_')){
$('html, body').animate({
scrollTop: $searchFilter.offset().top - $header.outerHeight()
}, 1000,'swing');
}}
});
});
jQuery(function ($){
$(document).ready(()=> {
if($('body.blog')||$('body.page-id-2046').length){
let $scrollToThis=$('.top-pager');
$('body').on('click', '.bottom-pager .facetwp-page',(e)=>{
let $headerHeight=$('header.header-area').outerHeight()
$('html, body').animate({
scrollTop: $scrollToThis.offset().top - ($headerHeight + 40)
}, 1000,'swing');
})
}});
});
jQuery(function ($){
$(document).ready(()=> {
let $collateral=$('a[href$="news/?_news_category=collateral"]');
if($collateral){
}});
});
jQuery(function ($){
$(document).ready(()=> {
let $searchForm=$('#search-1');
let $searchInput=$('#search-1>input');
if($searchForm){
$searchForm.append(`<div id="clear-search">X</div>`);
$clearSearch=$('#clear-search');
$clearSearch.click((e)=>{
document.querySelector('#search-1>input').value="";
});
}});
});
jQuery(function ($){
$(document).ready(()=> {
if($('body.page-id-7482').length){
let $title=$('.breadcrumb-inner>.title');
let titleText=$title.text();
if(titleText.includes('altOS™ Mobile Platform')){
$title.html('altOS<span class="altos-trade">&trade;</span> Mobile Platform');
let $trade=$('.altos-trade');
}}
});
});
jQuery(function ($){
$(document).ready(()=> {
if($('body.page-id-9499').length||$('body.page-id-9793').length){
let $breadcrumb=$('#breadcrumbs .item-current>span');
$breadcrumb.text($breadcrumb.attr('title'));
}});
});