function AddRow() { for(i=1;i<40;i++) { if(document.getElementById('page['+i+']').style.display == 'none') { document.getElementById('page['+i+']').style.display = 'block'; break; } } } $(document).ready(function() { $("a[rel='lightbox']").fancybox(); $("#hp-tabs").tabs({ ajaxOptions: { error: function(xhr, status, index, anchor) { $(anchor.hash).html("Nepodařilo se načíst záložku. Omlouváme se."); } } }); }); function toggleTab(num,numelems,opennum,animate) { if ($('#tabContent' + num).css('display') == 'none') { for (var i=1; i<=numelems; i++) { if (num != i) { $('#tabContent'+i).fadeOut('fast'); } } $('#tabContent'+num).fadeIn('slow'); } } function hideSubTab(count, num) { for(var i=1;i<=count;i++) { if(i != num || num == null) { $('#subTab' + i).fadeOut('fast'); } } } function showSubTab(num,count) { hideSubTab(count, num); $('#subTab' + num).fadeIn('slow'); }