document.addEventListener("DOMContentLoaded", function () {
var tab1 = document.getElementById('ui-id-1');
var tab2 = document.getElementById('ui-id-2');
if (tab1 && tab2) {
tab1.addEventListener('click', function () {
if (localStorage) localStorage.isSecondTab = '';
});
tab2.addEventListener('click', function () {
if (localStorage) localStorage.isSecondTab = 'true';
});
if (localStorage && localStorage.isSecondTab === 'true') tab2.click();
}
});