$(function() {
	// Header cycle
	$('#headerVisual').cycle({ 
	    fx:    'fade', 
	    speed:  2500,
		timeout: 4000,
		pause:  1,
		random:  0 
	 });
	
	// FORMS - focus and blur
	$('.input input').focus(function() {
		$(this).select().parent().addClass('focus');
	});
	$('.input input').blur(function() {
		$(this).parent().removeClass('focus');
	});
	// FORMS - clicking on hint
	$('.input .hint').click(function() {
		$(this).parent().addClass('focus').find('input').select();
	});
	// FORMS - Empty filled fields on blur
	$('.input input').each(function() {
		$(this).blur(function() {
			$(this).parent().removeClass('focus');
			if ($(this).val() != "") {
				$(this).parent().addClass('filled');
			} else {
				$(this).parent().removeClass('filled');
			};
		});
	});
	// FORMS - Empty filled fields on load
	$('.input input').each(function() {
		if ($(this).val() != "") {
			$(this).parent().addClass('filled');
		} else {
			$(this).parent().removeClass('filled');
		};
	});
   
});

