$(document).ready(function() {
	
	$.fn.nyroModal.settings.minWidth = 50;
	$.fn.nyroModal.settings.minHeight = 50;

	$.fn.nyroModal.settings.showBackground = function (elts, settings, callback)
	{
		nyro_show_bg()

		elts.bg.css({opacity: 0.75});
		callback();
	}


	$.fn.nyroModal.settings.hideContent = function (elts, settings, callback)
	{
		elts.contentWrapper.hide();
		callback();

		nyro_hide();
	};

	
	
	$("#home_services div.grid_4").hover(
		function () {
			if(jQuery.browser.msie)
			{
				$(this).css({"height":"160px", "top":"0px"});
			}
			else
			{
				$(this).animate({
			    	height: '160px',
			    	top: '0px'
			  	}, 200, function() {
			    	// Animation complete.
			  	});
			}
			

		}, 
		function () {
			if(jQuery.browser.msie)
			{
				$(this).css({"height":"140px", "top":"20px"});
			}
			else
			{
				$(this).animate({
			    	height: '140px',
			    	top: '20px'
			  	}, 200, function() {
			    	// Animation complete.
			  	});
			}
		}
	);
	
	$('#type_of_transportation').change(function(){
		if($('#type_of_transportation').val() == ''){
			$('#extrafields_1').css('display','none');
			$('#extrafields_2').css('display','none');
		}else if($('#type_of_transportation').val() == 'air'){
			$('#extrafields_1').css('display','block');
			$('#extrafields_2').css('display','none');
		}else{
			$('#extrafields_1').css('display','none');
			$('#extrafields_2').css('display','block');
		}
	});

});

function nyro_show_bg()
{
	$('DIV#CompasOuter').css('display', 'none');
}

function nyro_hide()
{
	$('DIV#CompasOuter').css('display', 'block');
}
