function checkForm() {
	from = document.getElementById('from').value;
	subject = document.getElementById('subjext').value;
	message = document.getElementById('message').value;
	
	if (from && subject && message) {
		return true;
	} else {
		window.alert('You must fill out all fields.');
		return false;
	}
}

jQuery(function(){
	url = window.location.href;
	re = new RegExp('/page/invite');
	if (re.test(url)) 
		{jQuery('form#quickSignUp').addClass('hidden');}
});

/*
 * label2value
 * jquery based script for using form labels as text field values
 * more info on http://cssglobe.com/post/1500/using-labels- 
 *
 * Copyright (c) 2008 Alen Grakalic (cssglobe.com)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 */

this.label2value = function(){	

	// CSS class names
	// put any class name you want
	// define this in external css (example provided)
	var inactive = "inactive";
	var active = "active";
	var focused = "focused";
	
	// function
	jQuery("form#quickSignUp label").each(function(){		
		obj = document.getElementById(jQuery(this).attr("for"));
		if((jQuery(obj).attr("type") == "text") || (obj.tagName.toLowerCase() == "textarea")){			
			jQuery(obj).addClass(inactive);			
			var text = jQuery(this).text();
			jQuery(this).css("display","none");			
			jQuery(obj).val(text);
			jQuery(obj).focus(function(){	
				jQuery(this).addClass(focused);
				jQuery(this).removeClass(inactive);
				jQuery(this).removeClass(active);								  
				if(jQuery(this).val() == text) jQuery(this).val("");
			});	
			jQuery(obj).blur(function(){	
				jQuery(this).removeClass(focused);													 
				if(jQuery(this).val() == "") {
					jQuery(this).val(text);
					jQuery(this).addClass(inactive);
				} else {jQuery(this).addClass(active);};				
			});				
		};	
	});		
};
// on load
jQuery(document).ready(function(){label2value();});


