/* Author: Christopher Smith

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

		/*// Cufon Font Replacement
		Cufon.replace('h1', { fontFamily: 'helvetica_neue_45', hover: true}); */
		
		/*
		//HTML mark up ------------------------------------------------------------------------------
		*/
		
		$('ul > li:last-child').addClass('last');
		$('ul > li:first-child').addClass('first');
		
		// Borders/Shadows
		$('#hero-wrapper').prepend('<div class="shadow-top"></div>');
		$('#hero-wrapper').append('<div class="shadow-bottom"></div>');
		$('#hero-content').append('<div class="shadow-right"></div>');
	
		// Hero Content
		$('#hero-content li').append('<a class="next" href="javascript:;">next</a><a class="previous" href="javascript:;">previous</a>');

		// External Links
		$('a[href^="http:"], a[href^="https:"]').not('[href*="'+location.hostname+'"]').attr('target', '_blank');
		$('a[rel=external]').attr('target', '_blank');
		//$('a.mailto').each(function() { lbb.helpers.mailto(this);});
		
		// Emails
		$('a.mailto').each(function(i)
		{
			var etext = $(this).text();
			var address = etext.replace('__AT__', '@').replace('__DOT__', '.');
		
			$(this).attr('href', 'mailto:' + address);
			$(this).text(address);
		});
		
		//Beaver Icon
		$('a#beavers').prepend('<em></em>');
		
		//Holding Page Styles
		if (/\/regiment-museum.htm/.test(location.pathname))
		{
			$('body').attr('id', 'holding-page');
		}

		
		/*
		//Javascript Animation ------------------------------------------------------------------------------
		*/		
		
		// Home Page Heros		
		$('ul#rotating-quotes').cycle(
		{
			fx: 'fade',
			speed: 1000,
			timeout: 750,
			pause: 0,
			random: true, 
			cleartype: true,
			cleartypeNoBg: true
		});
		
		// Home Page Heros		
		$('ul#rotating-heroes').cycle(
		{
			fx: 'scrollHorz',
			speed:		1000,
			timeout:	10000,
			pause: 1,
			cleartype: true,
			cleartypeNoBg: true,
			next:  '.next', 
			prev:  '.previous' 
		});
		
		// Ticker Animation
		$('#remember-ticker').cycle(
		{
			fx: 'scrollUp',
			speed: 1000,
			timeout: 8000,
			pause: 0
		});


		
		
		
});




















