$(document).ready(function(){ // execute your scripts when the DOM is ready. this is mostly a good habit $(function() { // initialize scrollable $("#scroll").scrollable(); }); $("ul.tabs").tabs("div.panes > div"); $("ul.tabs li").last().children('a').addClass('last'); pocet_tabov = $("ul.tabs li").length + 1; $.each($("ul.tabs > li"), function(index){ $(this).children('a').css('z-index', pocet_tabov - index); }); def = $("#hviezdicky .star.active").length; /* Fancybox */ $("a[rel=skupina]").fancybox({ 'titlePosition' : 'inside', 'titleFormat' : function(title, currentArray, currentIndex, currentOpts) { return 'Obrázek ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? '
' + title : ''); }, 'centerOnScroll' : 'true' }); }); function efekt(){ $("#stred > .image > .vrch > .spodok > .max_size .efekt").remove(); $("#stred > .image > .vrch > .spodok > .max_size img").clone().prependTo("#stred > .image > .vrch > .spodok > .max_size"); $("#stred > .image > .vrch > .spodok > .max_size img").first().wrap('
'); $("#stred > .image > .vrch > .spodok > .max_size .efekt").animate({ opacity: 0, right: '-700px' }, 600, function() { $(this).remove(); }); } var def; function hodnot(pocet){ vynuluj(); $("#hviezdicky .star:lt(" + pocet + ")").addClass("active"); } function vynuluj(){ $("#hviezdicky .star").removeClass("active"); } function setDef(){ vynuluj(); $("#hviezdicky .star:lt(" + def + ")").addClass("active"); } function pridaj(stranka){ $.ajax({ url: stranka, success: function(data) { $("#hviezdicky").fadeTo(300, 0, function(){ $(this).html("

Hodnotilo "+data+" lidí...

").fadeTo(300, 1); }); } }); } function oznac(kolko, idecko) { $("#hviezdicky" + idecko + " .star").slice(0, kolko).addClass('active'); }