$(function(){
    
    /* tipsy */
    
    $('#calendarBody a').tipsy({live: true, gravity: 'w'});
    
    /* colorbox */
   
    $('.colorbox').colorbox(); 
   
   /* ajax links */
        $("a.ajax").live("click", function (event) {
            event.preventDefault();
            
            if ($(this).hasClass('delete')) {
                if (confirm('Opravdu smazat?')) {
                    $.get(this.href);       
                }                
            }
            else {
                $.get(this.href);    
            }
        });   
   
   /* tabs */
   
    $(".newsContent").hide(); //Hide all content
    $("ul.tabs li:first").addClass("active").show(); //Activate first tab
    $(".newsContent:first").show(); //Show first tab content

    //On Click Event
    $("ul.tabs li").click(function() {

        $("ul.tabs li").removeClass("active"); //Remove any "active" class
        $(this).addClass("active"); //Add "active" class to selected tab
        $(".newsContent").hide(); //Hide all tab content

        var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
        $(activeTab).fadeIn(); //Fade in the active ID content
        return false;
    });               
   
});

Cufon.replace('#menuTop li, .introText, .articleName, #sloupek h3, .box h3, #calendar h3, #lastArticlesHeading h3, #lastArticleH3, .article h3, #novinkyHp h3, #mc_embed_signup legend span', { hover: true }); // Requires a selector engine for IE 6-7, see above

