///**************************************///				   
///*****           Cufon            *****///	
///**************************************///
Cufon.set('fontFamily', 'museo-700').replace
	('#sideBar h2')
	
Cufon.set('fontFamily', 'museo-500').replace
	('#sideBar h2');
	
Cufon.set('fontFamily', 'museo-500').replace
	('#portfolioContainer h2');	
	
Cufon.set('fontFamily', 'museo-700').replace
	('#banner h3');
	

///***
$(document).ready(function(){
///***

///**************************************///				   
///*****      Recent Projects       *****///	
///**************************************///

	/// On hover displays hidden div (thumbOverlay) that shows more information with a view more button
	$('div.recentProject').hoverIntent(function(){		
		$(this).children('div.thumbOverlay').fadeIn(500);
	},function(){
		$(this).children('div.thumbOverlay').fadeOut(500);
	});
	
	/// Adds the hyphen in the middle of the heading
	$("<span class='hyphen'>-</span>").insertBefore("span.subHead"); 

	/// Adds the 'new' project banner in the top right corner
	$("div.recentProject").prepend("<div class='newProjectCorner'></div>");
	
///**************************************///				   
///*****      Home Page Banner      *****///	
///**************************************///
	
	/// Append cycle controls to the banner
	$("div#banner").append("<div id='bannerNavWrap' style='display: none'><div id='prevBannerButton'><a class='prevPage'></a></div><div id='nextBannerButton'><a class='nextPage'></a></div><div id='navi'></div></div>");
	
	/// Initiate cycle and set parameters
	$('div#scrollable').cycle({ 
			fx:     'fade', 
			speed:   900, 
			timeout: 0, 
			next:   'div#nextBannerButton a', 
			prev:   'div#prevBannerButton a',
			timeout: 10000,
			pause: 1,
			pager:  '#navi'
		});
		
		/// Create pager for cycle
		function pagerFactory(idx, slide) {
			var s = idx > 2 ? ' style="display:none"' : '';
			return '<a href="#"></a>';
		};
	
	/// Hide banner controls except on hover
	$('div#banner').hoverIntent(function(){		
		$('div#bannerNavWrap').fadeIn(500);
	},function(){
		$('div#bannerNavWrap').fadeOut(500);
	});

	
///**************************************///				   
///*****      Home Page Banner      *****///	
///**************************************///	

	$("#recentTwitterPosts").twitterFeed({
		userName: "chadort",
		numTweets: 1,
		loaderText: "Loading tweets...",
		slideIn: true,
		showHeading: false,
		headingText: "Twitter Feed",
		showProfileLink: false
	});

	$('div.recentProject').hoverIntent(function(){		
		$(this).children('div.thumbOverlay').fadeIn(500);
	},function(){
		$(this).children('div.thumbOverlay').fadeOut(500);
	});
	
	$("").click(function(){
		$(this).fadeIn();				 
	},function(){
		$(this).fadeOut();
	});
	
	
	

///***
});
///***

	

	
