/* C.A.T.S. FOUNDATION */
/* Javascript Triggers and Custom Functions
----------------------------------------------------------------------------- */


	$(window).load(function() {

		
			navigation();
			
			if (page == "index" || page == "news" || section == "client") {
				readmore();
			}	
			
			tabs('removeEmptyTabs');
			truncate();
			comments();
			paging();
			
			
			// PLUGIN: CLIQUE ACTIONS (Replaces submit buttons with text links)
			try { $('input[type=submit]').cliqueActions(); } catch (error) { alert('Error: Missing Clique Actions Plugin'); }
			
			// Initializing Cufon
			//cufon();	
			
			// Photos Page
			if (page == "index") {
			
				photoSlideshow();

				$('div#features div.widget-photo.slideshow div a, a#photos_back, a#photos_next').hover(function() {

					$('a#photos_back').show();
					$('a#photos_next').show();

				}, function() {

					$('a#photos_back').hide();
					$('a#photos_next').hide();

				});
						
			}


	});
	
	

/* FUNCTION: Cufon
----------------------------------------------------------------------------- */

	function cufon() {
		
		var trajan_bold = [
		
		'#title h2',
		'h3',
		'#page-news h4', 
		'#sidebar h4', 		
		'ul.tabs li a', 
		'a.action', 
		'td a.details', 
		'strong.toggle', 
		'a.toggle', 
		'div.widget-tag a', 
		'div.widget-tag strong a'
		
		];
		
   		Cufon.replace(trajan_bold.toString(), { fontFamily: 'Trajan', hover: true });
   		
   		$(trajan_bold.toString()).css('visibility', 'visible');
		
	}
	
	
	

