// JavaScript Document

$(document).ready(function(){
     $('#slider').nivoSlider({
        effect: 'fold,fade,sliceUpLeft', // 'fold,fade,sliceDown'
        slices: 6, 
        animSpeed: 1000, 
        pauseTime: 5000, 
		slideshowEnd: function(){$('#slider').data('nivoslider').stop(); },
        directionNav: true, 
        directionNavHide: true, // Only show on hover
        controlNav: true, 
        prevText: 'poprzedni', // Prev directionNav text
        nextText: 'następne'
    });
	$("#wspacer a").colorbox({opacity:0.5, iframe:true, width:"95%", innerHeight:610});
});

function _wydarzenie(data){ 
	var html = $.ajax({
	type: "POST",
	data: 'task=showWydarzenie&data='+data+'&nd='+new Date().getTime(),
	url: 'tasks.php',
	error:function (xhr, ajaxOptions, thrownError){
					alert('Błąd połączenia z serwerem. Spróbuj ponownie');
                },  
	success:function(responseText){
					$('#kalendariuminfo').html(responseText);
                },
	async: false}).responseText;
}
