  $(document).ready(function(){	
	  $("#slider").easySlider({
		  auto: true, 
		  continuous: true,
		  numeric: true,
		  speed: 500,
		  pause: 8000
	  });
  });	
 
 function kalendarz(type) {
	$.ajax({
		  url: "inc/imprezy.php",
		  data: "action=" + type + "&id=1",
		  dataType: "json",
		  success: function(calendarEvents){ 
				   $("#kalendarz").datepicker({
		
				   // [rows, columns] if you want to display multiple calendars.                         
				   numberOfMonths: [1, 1],
				   showCurrentAtPos: 0,
				   beforeShowDay: function (date){
								  for (i = 0; i < calendarEvents.length; i++) {
									  if (date.getMonth() == calendarEvents[i][0] - 1 
									  && date.getDate() == calendarEvents[i][1]
									  && date.getFullYear() == calendarEvents[i][2]) {
									  //[disable/enable, class for styling appearance, tool tip]
									  return [true,"event",calendarEvents[i][3]]; 
									  }
								   }
								   return [true, ""];//enable all other days
								}
				   });
				   
			}
	});
 }


