
jQuery(document).ready(function() {

     $("#middle_content_ajax").fadeOut();



   //menu
   $("#header ul li").hover(
  function () {
 

    $(this).addClass('hover_li');
  }, 
  function () {
    $(this).removeClass('hover_li');
  }
);



  //scroll
  $('.scroll-pane').jScrollPane({showArrows:true});


//odliczanie

var feliniada = new Date("May 25, 2011 17:30:00");
feliniada.setDate(feliniada.getDate());
 
$('#defaultCountdown').countdown({until: feliniada}); 
 
$('#removeCountdown').toggle(function() { 
        $(this).text('Re-attach'); 
        $('#defaultCountdown').countdown('destroy'); 
    }, 
    function() { 
        $(this).text('Remove'); 
        $('#defaultCountdown').countdown({until: feliniada}); 
    } 
);

//karuzela
    jQuery('#sponsor').jcarousel({
         auto: 2,
         scroll: 2,
        
        wrap: 'last',
        initCallback: mycarousel_initCallback

    });
});

function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
}

