$(document).ready(function(){

	function formatText(index, panel) {
		//return "<span>"+index+"</span>";
		return index;
	}
	
	/* $('.anythingSlider').anythingSlider({
	   easing: "swing",                // Anything other than "linear" or "swing" requires the easing plugin
	   autoPlay: true,                 // This turns off the entire FUNCTIONALITY, not just if it starts running or not
	   startStopped: false,            // If autoPlay is on, this can force it to start stopped
	   delay: 3000,                    // How long between slide transitions in AutoPlay mode
	   animationTime: 600,             // How long the slide transition takes
	   hashTags: true,                 // Should links change the hashtag in the URL?
	   buildNavigation: true,          // If true, builds and list of anchor links to link to each slide
	   pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
	   startText: "Start",             // Start text
	   stopText: "Stop",               // Stop text
	   navigationFormatter: formatText       // Advanced Use: details below
	}); */ 
	
	$('#slider').jFader({
		slideClass: "SlidePage",
		naviClass: "SlideNavi",
		naviActClass: "act",
		easing: "easeInOutExpo",
		delay: 3500,
		animationTime: 3000,
		navi: true	
	}); 
	/*
	$(".slide1").click(function(){
                $('.anythingSlider').anythingSlider(1);
				return false;
    });	
	$(".slide2").click(function(){
                $('.anythingSlider').anythingSlider(2);
				return false;
    });
	$(".slide3").click(function(){
                $('.anythingSlider').anythingSlider(3);
				return false;
    });
	$(".slide4").click(function(){
                $('.anythingSlider').anythingSlider(4);
				return false;
    });
	*/
	$("table.lista tr:odd,table.zebra tr:odd").addClass('odd');
	$("table.lista tr:even,table.zebra tr:even").addClass('even');
	$("table.lista tr").find("td:first").addClass('first');
	$("table.lista tr").find("td:last").addClass('last'); 
	
	//$(".lightbox2").lightBox();
	$(".lightbox").lightBox_old();
	//$('a[@rel*=lightbox]').lightBox_old();	
	
	$("table.terminarz tbody tr:odd,table.cennik tbody tr:odd").addClass('odd');
	$("table.terminarz tbody tr:even,table.cennik tbody tr:even").addClass('even');
	
	$("table.terminarz tr td:nth-child(1),table.terminarz tr th:nth-child(1)").addClass('jeden');
	$("table.terminarz tr td:nth-child(2),table.terminarz tr th:nth-child(2)").addClass('dwa');
	$("table.terminarz tr td:nth-child(3),table.terminarz tr th:nth-child(3)").addClass('trzy');
	$("table.terminarz tr td:nth-child(4),table.terminarz tr th:nth-child(4)").addClass('cztery');	
	$("table.terminarz tr td:nth-child(3) p:even").addClass('even');
	
	$("table.cennik tr td:nth-child(1),table.cennik tr th:nth-child(1)").addClass('jeden');
	$("table.cennik tr td:nth-child(4),table.cennik tr th:nth-child(4)").addClass('cztery');
	$("table.cennik tr td:nth-child(5),table.cennik tr th:nth-child(5)").addClass('piec');
	
	$(".ajax").submit(function(){
	   $(this).ajaxSubmit(options_wyslij);
	   return false;
	});
	var options_wyslij = {
          //target:        '#myList',   // target element(s) to be updated with server response
          //beforeSubmit:  showRequest,  // pre-submit callback
          url: 'ajax.php',
		  resetForm: true,
          success:       showResponse_tekst
    };
	function showResponse_tekst(responseText, statusText)  {
		alert(responseText);
	}
});

