// JavaScript Document

$(document).ready(function(){
	
	document.getElementById('fillImage').style.display = 'none';
	document.getElementById('slider').style.display = 'block';
	
	$("#slider").easySlider({
		auto: true,
		continuous: true,
		numeric: true
	});
	
//	$('#slider').nivoSlider({
//		effect:'random',
//		slices:15,
//		animSpeed:500,
//		pauseTime:3000,
//		directionNav:true, //Next & Prev
//		directionNavHide:true, //Only show on hover
//		controlNav:true, //1,2,3...
//		beforeChange: function(){},
//		afterChange: function(){}
//	});
	
	$(function(){
		$('#contact').contactable({
			name: 'Name',
			email: 'email',
			message: 'message',
	 		recipient: 'admissions@tfc.edu',
	 		subject: 'Request for Information',
			recievedMsg : 'Thank you for requesting information. You will be contacted soon.',
 			notRecievedMsg : 'Sorry, your message could not be sent, try again later'
	 	});
	});
	
	//News & Twitter Feeds
	$(function() {
    	$('#newsBlog').gFeed( { url: 'http://news.tfc.edu/feed/', tabs: false, max: 2 });
		
		$('#twitter_div').gFeed( { url: 'http://twitter.com/statuses/user_timeline/28625900.rss', tabs: false, max: 1 });
	
	});
		
});

//Suggestion Box
$("#suggestionProcess").click(function(){
	$.post("../php_forms/suggestion.php", $("#suggestionForm").serialize(), function(data){
		$("#response").html(data);
	});
});
