/**
 * Make main menu js-active.
 * If menu element has submenu, it can be oppened and closed
 */
(function($){
$(document).ready(function() {
	var mainMenu = $('ul.menu-main');
	
	// if any of ULs have a.active or some A has class active, then open it by default
	$('a.active, ul:has(a.active)', mainMenu).each(function() {
		$('ul', $(this).parent()).css('display', 'block');
		// .show() does not works due to too strict css.
	})
	 
});
})(jQuery);
