хавлии
халати
пончо -хавлия
.usp-bar { background:#fff8e1; }
.usp-bar div { text-align:center; padding:6px 10px; font-size:14px; }
document.addEventListener('DOMContentLoaded', function () {
try {
const selects = Array.from(document.querySelectorAll('select'))
.filter(s => /(sort|order|orderby)/i.test([s.name, s.id, s.className].join(' ')));
for (const s of selects) {
const opt = Array.from(s.options).find(o => {
const txt = (o.textContent || '').toLowerCase();
const val = (o.value || '').toLowerCase();
return (
(txt.includes('име') && (txt.includes('a–я') || txt.includes('а–я') || txt.includes('a-z'))) ||
((val.includes('name') || val.includes('title')) && (val.includes('asc') || val.includes('a')))
);
});
if (opt && s.value !== opt.value) {
s.value = opt.value;
s.dispatchEvent(new Event('change', { bubbles: true }));
break;
}
}
} catch (e) {
console.warn('Alphabetical sort helper:', e);
}
});