$(document).ready(function() {
	
	// Begin jQuery for calendar.php
	$('#next').live('click', function() {
		var currentmonth = $('#currentmonth').val();
		$.ajax({
     		type: "POST",
     		url: "/calendar_ajax_load.php",
     		data: "direction=next&currentmonth="+currentmonth,
     		success: function(html){
				$('#calendar').html(html);    		    
     		}
    	});
   });
   
   $('#previous').live('click', function() {
		var currentmonth = $('#currentmonthp').val();
		$.ajax({
     		type: "POST",
     		url: "/calendar_ajax_load.php",
     		data:  "direction=previous&currentmonth="+currentmonth,
     		success: function(html){
       			$('#calendar').html(html);    		    
     		}
    	});
   });
   
   $("table.informational tr:first-child").addClass("first-child");
   
   $("table.informational tr td:first-child").addClass("first-child");
   
   $("table.informational tr:nth-child(even)").addClass("even");
   
	$('.rollover-text').hide();


	$(".rollover").hover(
	function(){
		$(this).next('.rollover-text').show();
	}, 
  	function () {
   		$(this).next('.rollover-text').delay(150).hide(0);
	});


	$(".rollover").hover(
	function(){
		$(this).parent().next('.rollover-text').show();
	}, 
  	function () {
   		$(this).parent().next('.rollover-text').delay(500).hide(0);
	});

	$(".rollover-text").hover(
	function () {
  	  $(this).stop().show();
 		 }, 
  	function () {
   	  $(this).delay(100).hide(0);
	});
	
	//Nivo-Slider Controls
	$('#slider').nivoSlider({
		effect: 'fade', 
		pauseTime: 8000,
	        startSlide:0, //Set starting Slide (0 index)
	        directionNav:true, //Next and Prev
			directionNavHide:true,
	        controlNav:true, //1,2,3...
	        keyboardNav:true, //Use left and right arrows
	        pauseOnHover:true, //Stop animation while hovering
	        prevText: 'Prev',
	        nextText: 'Next'  
	});


});	// END $(document).ready(function()
