var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{ let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opens = _____WB$wombat$assign$function_____("opens"); /** *------------------------------------------------------------------------------ * @package T3 Framework for Joomla! *------------------------------------------------------------------------------ * @copyright Copyright (C) 2004-2013 JoomlArt.com. All Rights Reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * @authors JoomlArt, JoomlaBamboo, (contribute to this project at github * & Google group to become co-author) * @Google group: https://groups.google.com/forum/#!forum/t3fw * @Link: http://t3-framework.org *------------------------------------------------------------------------------ */ jQuery(document).ready(function ($) { // clone the collapse menu from mainnav (.t3-navbar) $('.t3-navbar').each(function(){ var $navwrapper = $(this), $menu = null, $placeholder = null; if ($navwrapper.find('.t3-megamenu').length) { // clone for megamenu $menu = $navwrapper.find('ul.level0').clone(), $placeholder = $navwrapper.prev('.navbar-collapse'); if(!$placeholder.length){ //get the empty one $placeholder = $navwrapper.closest('.container, .t3-mainnav').find('.navbar-collapse:empty'); } var lis = $menu.find('li[data-id]'), liactive = lis.filter('.current'); // clean class lis.removeClass('mega dropdown mega-align-left mega-align-right mega-align-center mega-align-adjust'); // rebuild lis.each(function () { // get firstchild - a or span var $li = $(this), $child = $li.find('>:first-child'); if ($child[0].nodeName == 'DIV') { $child.find('>:first-child').prependTo($li); $child.remove(); } // remove caret if($li.data('hidewcol')){ $child.find('.caret').remove(); $child.nextAll().remove(); return; //that is all for this item } // find subnav and inject into one ul var subul = $li.find('ul.level' + $li.data('level')); if (subul.length) { // create subnav $ul = $('