AudioPlayer.setup("http://www.agingwithgrace.net/scripts/player.swf", {  
	width: 300  
});
            
$(document).ready(function() {

$('#showAdvServices').show();
$('#geoServices').slideUp();
$('#showAdvServices').click(function() {
  $('#geoServices').slideToggle('slow', function() {
  });
});

// clear input on focus
$(".clearOnFocus").click(function() {
	$(".clearOnFocus").attr("value","");
});

$('#mainForm').validationEngine();
initMenu();
$("ul.sf-menu").superfish({ 
  pathClass:  'current' 
}); 
/*
	// Easy Pullquotes by Mike Jolley
	// Go through each span element with a classname of "pullquote"
	$('span.pullquote').each(function() {
		// Get the text of the span
		text = $(this).text();
		// Get rid of unwanted charactors
		text=text.replace( /\((.*)\)/gi, " " );
		// Check if this is to be a right or left pull quote and output it
		if ($(this).is(".right")) 
			$(this).parent().before('<blockquote class="pullquote right"><p>&quot;'+ text +'&quot;</p></blockquote>');
		else
			$(this).parent().before('<blockquote class="pullquote"><p>&quot;'+ text +'&quot;</p></blockquote>');
	});
	// End pull quote code

*/

});

function initMenu() {
  $('.accordion ul').hide();
  $('.accordion ul.starter').show();
  $('.accordion li h4').click(
    function() {
      var checkElement = $(this).next();
      if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
        return false;
        }
      if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
        $('.accordion ul:visible').slideUp('fast');
        checkElement.slideDown('fast');
        return false;
        }
      }
    );
  }
  