DAR-1496: optimize jquery vars and fix tabs