// global namespace to keep variables clean
//
var HYDRA = {};

//	once the document is loaded
//
$( document ).ready( function() {
    
    // change color of form inputs on hover
	//
	$('.text_input, .select, textarea')
		.focus(
			function () {
				{
					keyword_color = $(this).css('color');
					$(this).css('color', '#B2B2B2');
				}
			}
		)
		.blur(
			function () {
					$(this).css('color', keyword_color);
			}
		)
    
    
    
    // drop downs for main menu
	//
	$('#nav_main').superfish({
		animation : { opacity:"show", height:"show", speed:"fast", delay: "100" }
	});
    
    
    // Clear and unclear search box on focus and blur
	//
	$('#form_search .text_input')
		.focus(
			function () {
				if ($(this).val() == 'Search Sunovia')
				{
					stored_value = $(this).val();
					$(this).val('');
				}
			}
		)
		.blur(
			function () {
				if ($(this).val() == '' && stored_value == 'Search Sunovia')
				{
					$(this).val(stored_value);
				}
			}
		)
		
    
    // drop downs for main menu
	//
	$('#nav_main').superfish({
		animation : { opacity:"show", height:"show", speed:"fast", delay: "100" }
	});
    
    
    // toggle team info
	//
	$('.js_expand').toggle(
			function () {
			    $(this).parent().parent().parent().find('.hide').slideDown();
			    $(this).hide();	
			},
			function () {
				$(this).parent().parent().parent().find('.hide').slideUp();
			}
		)
    
}); //	end of ducument ready