/*
/*	Dynamic design functions and onLoad events
/*	----------------------------------------------------------------------
/* 	Creates added dynamic functions and initializes loading.
*/


// ======================================================================
//
//	On document ready functions
//
// ======================================================================

jQuery(document).ready(function($) {
	
	
	
	// Show/Hide slide show buttons
	// -------------------------------------------------------------------
	// This will show/hide the slide show buttons for Next and Previous
	// on the jQuery Cycle plugin slide show.
	
	if ($('#CyclePlugin #Slides').length > 0) {
		// on mouse over/out functions
		if (typeof $.fn.hoverIntent == 'function') {
			$('#SlideShow').hoverIntent(function() {showSlideNav(jQuery)}, function() {hideSlideNav(jQuery)});
		} else {
			$('#SlideShow').hover(function() {showSlideNav(jQuery)}, function() {hideSlideNav(jQuery)});
		}
		// Hide on page load...
		if ($('#SlideShow-Controls')) {
			var initHideSlideNav = setTimeout("hideSlideNav(jQuery)", 1000);	// delay in milliseconds
		}
	}








	// apply custom search input functions
	// -------------------------------------------------------------------

	

});




// ======================================================================
//
//	Design functions
//
// ======================================================================


	
// Search input - custom effects for mouse over and focus.
// -------------------------------------------------------------------


$j(function() { 
 
    $j('.searchbox').focus(function() { $j(this).val(''); }); 

 
 }); 

// Functions to show and hide slide navigation controls (for cycle SS)
// -------------------------------------------------------------------

	// show slide navigation
	function showSlideNav($) {
		if ($('#SlideShow-Controls').length > 0) {
			$('#SlideShow-Controls').slideDown('fast');
		}		
	}
	// hide slide navigation
	function hideSlideNav($) {
		if ($('#SlideShow-Controls').length > 0) {
			$('#SlideShow-Controls').slideUp('fast');
		}
	}


// Apply font replacement (cufon)
// -------------------------------------------------------------------
Cufon.replace('h1, h2, h3, h4, h5, h6, legend #fancybox-title-main', { fontFamily: 'Vegur' });
Cufon.replace('.boxtitle', { fontFamily: 'Franklin Gothic Std' });


