// jQuery fadeToggle plugin
// http://yelotofu.com/labs/fade-toggle/

	jQuery.fn.fadeToggle = function(s, fn){
		return (this.is(":visible"))
		? this.fadeOut(s, fn)
		: this.fadeIn(s, fn);
	};
	
	// utilising fadeToggle to show/hide .content DIV
	jQuery(function($){
		var labelHide = 'x';
		var labelShow = '+';
		$(".toggler").text(labelHide);
		
		$(".toggler").click(function(){
			var copy = $(".msgbox").is(":visible") ? labelShow : labelHide;
			$(".msgbox").fadeToggle();
			$(this).text(copy);
		});
	});

	$(document).ready(function(){
   		if (!$('#messageBox').html()) {
   			$(".msgbox").hide();
   			$(".toggler").text('');
   		}
   	});
   	
