$(document).ready(function() {
    $('.slideshow').cycle({
		fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});
	$("#freeform").jqTransform();

	
	//$('h1').hide().show('slow');
	
	$("#tbl_calendar div").hide();
	$("#tbl_calendar a").hover(function() {
		$(this).next('div').animate({
			opacity: "show",
			queue: false
		}, "fast");
	}, function() {
		$(this).next('div').animate({
			opacity: "hide",
			queue: false
		}, "fast");
	});

	
	/* PHOTO GALLERY */
	$("#photoGallery img").hover(function() {
		$(this).animate({
			marginTop: "-5px",
			queue: false
		}, "fast");
	}, function() {
		$(this).animate({
			marginTop: "0px",
			queue: false
		}, "fast");
	});
	$("#photoGallery a[rel^='prettyPhoto']").prettyPhoto({theme:'light_rounded'});
	
	/* CONTACT PAGE */
	$(".exp p").hide();
	$('<span>Show</span>').appendTo('.exp h3');
	//$('.exp h3:first').children('span').text('hide');
	//$(".exp p:first").animate({
	//	height: 'toggle'
	//}, 'slow');

	$(".exp h3").click(function() {
		$(this).next('p').animate({
			height: 'toggle'
		});
		
		if ($(this).children('span').text() =='hide')
		{
			$(this).children('span').text('show');
		} else {
			$(this).children('span').text('hide');	
		}
	});
	
	
	/* EVNEVT PAGE */
	$(".event_entry h3").next('div').hide();
	$(".event_entry:first h3").next('div').show();
	$('<span>Show</span>').prependTo('.event_entry h3');
	//$('#eventList .event_entry:first h3').children('span').text('show');
//	$("#eventList .event_entry:first").animate({
//		height: 'toggle'
//	}, 'slow');

	$(".event_entry h3").click(function() {
		$(this).next('div').animate({
			height: 'toggle'
		});
		
		if ($(this).children('span').text() =='hide')
		{
			$(this).children('span').text('show');
		} else {
			$(this).children('span').text('hide');	
		}
	});
});


