jQuery(document).ready(function($) {

	/*if($('#quote ul').length > 0) {
		$('#quote ul').cycle({
			timeout: 5000,
			speed: 1000,
			delay: 5000
		});
	}*/
	
	function setFieldBehaviour(obj, val) {
		obj.val(val).focus(function(){
			if ($(this).val() == val) $(this).val('');
		});
		obj.parents('form').submit(function(){
			if (obj.val() == val) obj.val('');
		});
	}
	
	setFieldBehaviour($('#commentform textarea'), 'Please write your comments here...');
	setFieldBehaviour($('#commentform input#author'), 'Your name here...');
	setFieldBehaviour($('#commentform input#email'), 'Your email here...');
	$('#commentform').validate();

	setFieldBehaviour($('#searchform input#s'), 'Search...');
	$('#searchform').validate({
		rules: {
			s: {
				required: true,
				minlength: 3
			}
		}
	});
	
});