﻿$(function(){

	// Accordion
	$('#accordion').accordion({
		active: false,
		autoHeight: false,
		collapsible: true,
		header: 'h6'
	});
	
	// Reveal
	$('.reveal .hidden').hide();
	$('<a class="reveal-link"> + LEARN MORE</a>').appendTo('.reveal');
	
	$('a.reveal-link').toggle(function(){
			$(this).siblings('.hidden').show();
			$(this).html(' [-] MINIMIZE');
		}, function(){
			$(this).siblings('.hidden').hide();
			$(this).html(' + LEARN MORE');
	});
	
	// Fancybox Overlay		
	$("a.overlay").fancybox({
		hideOnContentClick: false,
		overlayOpacity: 0.75,
		overlayColor: '#000',
		titleShow: false,
		transitionIn: 'none',
		transitionOut: 'none'
	});
	
	// Slideshow module
	$('#slide')
	.after('<div id="photo-pager"></div><a id="prevBtn" href="#">Previous</a><a id="nextBtn" href="#">Next</a>')
	.cycle({
		fx:  'fade',
		timeout:  10000,
		next:  '#nextBtn',
		prev:  '#prevBtn',
		pager:  '#photo-pager',
		activePagerClass:  'selected'
	});

});
