(function($) {
"use strict";
$(document).ready(function() {
/*-----------------------------------------------------------------------------------*/
/* Home icon in main menu
/*-----------------------------------------------------------------------------------*/
$('.main-navigation .menu-item-home a').prepend('');
/*-----------------------------------------------------------------------------------*/
/* If the Tagcloud widget exist or Edit Comments Link exist
/*-----------------------------------------------------------------------------------*/
if ('.widget .tagcloud') {
$('.widget .tagcloud').addClass('smallPart');
}
if ('.comment-metadata') {
$('.comment-metadata').addClass('smallPart');
}
/*-----------------------------------------------------------------------------------*/
/* Top Search Button
/*-----------------------------------------------------------------------------------*/
$('.top-search').click(function() {
$('.topSearchForm').slideToggle('fast');
$(this).toggleClass("active");
return false;
});
/*-----------------------------------------------------------------------------------*/
/* Overlay Effect for Featured Image
/*-----------------------------------------------------------------------------------*/
$(".overlay-img").hover(function () {
$(this).stop().animate({
opacity: .5
}, 300);
},
function () {
$(this).stop().animate({
opacity: 0
}, 300);
});
/*-----------------------------------------------------------------------------------*/
/* Detect Mobile Browser
/*-----------------------------------------------------------------------------------*/
if ( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
} else {
/*-----------------------------------------------------------------------------------*/
/* If menu has submenu
/*-----------------------------------------------------------------------------------*/
$('.main-navigation').find("li").each(function(){
if($(this).children("ul").length > 0){
$(this).append("");
}
});
/*-----------------------------------------------------------------------------------*/
/* Scroll To Top
/*-----------------------------------------------------------------------------------*/
$("#toTop").scrollToTop();
}
});
})(jQuery);