tab') != -1)
                {
                    tabs.push(links[j]);
                    links[j].tabs = tabs;
                    var tab = document.getElementById(links[j].href.substr(links[j].href.indexOf('#') + 1));
                    //reset all tabs on start
                    if (tab)
                    {
                        if (links[j].className.indexOf('active')!=-1) {
                            tab.style.display = 'block';
                        }
                        else {
      