function checkEventCount() {
    /*$.ajax({
      url: '/belzig/DE/ajax/ajax.php?time[]='+$("#ev_time1").val()+
                          '&time[]='+$("#ev_time2").val()+
                          '&ort='+$("#ev_ort").val()+
                          '&text='+$("#ev_txt").val()+
                          '&highlight='+($("#ev_high:checked").val()=='1'?'1':'0')+
                          '&art='+$("#ev_art").val(),
      success: function(data) {
        data=eval(data);
        var text = "";
        switch (data){
          case "1": text = "1"; break;
          case "0": text = "0"; break;
          default: text = data; break;
        }
        $('#ev_submit').val(text);
        
      }
    });*/
  }

function slideNow() {
  var active = $('.slideshow img.active');
  $(active).fadeOut(900).removeClass('active');

  var next;
  if ($(active).next('img').length > 0) {
    next = $(active).next('img');
  } else {
    next = $('.slideshow img:first');
  }

  $(next).fadeIn(900).addClass('active');
}

$(function() {
  if ($('.slideshow.small').length == 0) {
    window.setInterval("slideNow()", 8000); //start slideshow
  }
});

