function formFocus(theForm, theCurrent, theDesired) {
	if (theForm.value == theCurrent) {
		theForm.value = theDesired;
	}
}

jQuery.noConflict();
jQuery(document).ready(function () {
	jQuery('input[type="text"], textarea').focus(function() {
		formFocus(this, this.defaultValue, '');
	}).blur(function() {
		formFocus(this, '', this.defaultValue);
	});
	
	//find the msg_body with testimonials and add id="accordion" to it (on the clients page)
	jQuery(".msg_body").has('blockquote').attr("id", "accordion");
	//wrap testimonial elements into accordion element (on the testimonials page)
	jQuery(".page-slug-testimonials #main-content")
		.find(".testimonial-header, blockquote")
		.wrapAll('<div id="accordion" />');
	
	
	//initialise accordion functionality
	jQuery("#accordion").accordion({ 
		header: 'p.testimonial-header',
		autoHeight: false,
		collapsible: true,
	});
	
	jQuery(".msg_body").hide();
	//toggle the componenet with class msg_body
	jQuery(".msg_head").click(function() {
    	jQuery(this).next(".msg_body").slideToggle(500);
	});
});
