$(document).ready(function() {
  if($('#test')[0].offsetWidth == 1) {
	$('#feature h1').each(function() {
	  string = $(this).text();
	  filename = string.toLowerCase().replace(/ /g, '-').replace(/([^0-9a-z-])/g,'');
	  $(this).html('<img src="/images/headers/home-headline.gif" alt="' + string + '" width="397" height="84" />');
	});
  };
  $('#nav a#navAbout').css('background-position','0px 0px').mouseover(function() {
		$(this).stop().animate({backgroundPosition:'(0px -40px)'},750,'easeOutBounce');			
	}).mouseout(function() {
		$(this).stop().animate({backgroundPosition:'(0px 0px)'},750,'easeOutBounce');	
	});
  $('a#navAvailability').css('background-position','-98px 0px')
  	.mouseover(function() {
		$(this).stop().animate({backgroundPosition:'(-98px -40px)'},750,'easeOutBounce');			
	}).mouseout(function() {
		$(this).stop().animate({backgroundPosition:'(-98px 0px)'},750,'easeOutBounce');	
	});
  $('a#navForms').css('background-position','-205px 0px')
  	.mouseover(function() {
		$(this).stop().animate({backgroundPosition:'(-205px -40px)'},750,'easeOutBounce');			
	}).mouseout(function() {
		$(this).stop().animate({backgroundPosition:'(-205px 0px)'},750,'easeOutBounce');	
	});
  $('a#navPolicies').css('background-position','-276px 0px')
  	.mouseover(function() {
		$(this).stop().animate({backgroundPosition:'(-276px -40px)'},750,'easeOutBounce');			
	}).mouseout(function() {
		$(this).stop().animate({backgroundPosition:'(-276px 0px)'},750,'easeOutBounce');	
	});
  $('a#navDirections').css('background-position','-358px 0px')
  	.mouseover(function() {
		$(this).stop().animate({backgroundPosition:'(-358px -40px)'},750,'easeOutBounce');			
	}).mouseout(function() {
		$(this).stop().animate({backgroundPosition:'(-358px 0px)'},750,'easeOutBounce');	
	});
  $('a#navContact').css('background-position','-458px 0px')
  	.mouseover(function() {
		$(this).stop().animate({backgroundPosition:'(-458px -40px)'},750,'easeOutBounce');			
	}).mouseout(function() {
		$(this).stop().animate({backgroundPosition:'(-458px 0px)'},750,'easeOutBounce');	
	});
  $('.email').defuscate();
})
