/* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ jQuery(document).ready(function ($) { $('#content img').not('.nr').addClass('img-responsive') $('table').not('.nr').addClass('table').wrap('
') //$('a.scrolly').scrolly(); //$('li.scrolly a').scrolly(); screen_resize() $(window).resize(screen_resize) if ($('#wpadminbar').length != 0 && $('.box-wrapper-main').length != 0) { var admin_bar_height = $('#wpadminbar').css('height') admin_bar_height = admin_bar_height.replace('px', '') var box_main_top = $('.box-wrapper-main').css('top') box_main_top = box_main_top.replace('px', '') var new_box_main_top = parseInt(box_main_top) + parseInt(admin_bar_height) $('.box-wrapper-main').css('top', new_box_main_top + 'px') } $('.lnt-open-content-link').on('click', function () { var lnt_open_content_id = $(this).attr('id').replace(/^\D+/g, ''); if (!isNaN(lnt_open_content_id)) { var lnt_opent_content_id_string = "details_post_id_" + lnt_open_content_id; var status = $("#" + lnt_opent_content_id_string).css('display'); if (status == "block") $("#" + lnt_opent_content_id_string).css('display', 'none') else $("#" + lnt_opent_content_id_string).css('display', 'block') } }); }) function screen_resize() { var admin_bar_height = 0 if (jQuery('#wpadminbar').length != 0) { admin_bar_height = jQuery('#wpadminbar').css('height') admin_bar_height = parseInt(admin_bar_height.replace('px', '')) } main_nav_height = jQuery('#menu-main-navigation').css('height') main_nav_height = parseInt(main_nav_height.replace('px', '')) jQuery('#menu-main-navigation').children('li.menu-item-has-children').each(function () { var new_top = parseInt(jQuery(this).position().top) + main_nav_height // - 6 - admin_bar_height var dropdown_menu_box = jQuery('#' + jQuery(this).attr('id')).find('.dropdown-menu-box') dropdown_menu_box.css('top', new_top + 'px') }) }