$(document).ready(function(){

	// SUB MENU
	$('#accordion').dcAccordion();
	$('#accordion-1').dcAccordion({
		eventType: 'click',
		autoClose: true,
		saveState: true,
		disableLink: true,
		speed: 'slow'
	});

	// COURSE CONTAINERS
	$(".toggle_container").hide();
	$("h6.trigger").toggle(function(){
		$(this).addClass("active");
		}, function () {
		$(this).removeClass("active");
	});
	$("h6.trigger").click(function(){
		$(this).next(".toggle_container").slideToggle("slow,");
	});

	// TOOLTIPS
	$('a.normalTip').aToolTip();
	$('a.fixedTip').aToolTip({
	fixed: true
	});

	// TWITTER
	$("#twitter").getTwitter({
		userName: "freshwater_tie",
		numTweets: 3,
		loaderText: "Loading tweets...",
		slideIn: false,
		slideDuration: 750,
		showHeading: true,
		headingText: "Latest Tweets",
		showProfileLink: true,
		showTimestamp: true
	});


// SLIDES
	$('#slides').slides({
//			preload: true,
//			preloadImage: 'images/slider/loading.gif',

		play: 6000,
		pause: 2500,
		hoverPause: true,

//			effect: 'slide, fade',
		effect: 'fade',
		crossfade: true,
		fadeSpeed: 1000,
	 	slideSpeed: 1500
	});
});

