jQuery(document).ready(function() {
	/*
	jQuery(".arrasta").sortable({
		stop : function () {
			var aConteudo = '';
			jQuery(this).find('div').each (function () {
				aConteudo += jQuery(this).attr('id')+',';
			});
			jQuery.cookie("arrastar", aConteudo, { expires: 100 });
		}
	});
	jQuery('.arrasta li').mouseover (function (){
		jQuery(this).css('cursor','move').attr('title','Clique para arrastar');
	}, function () {
		jQuery(this).css('cursor','default');
	});
	jQuery('.arrasta li').mousedown (function () {
		jQuery(this).css('opacity','0.6');
	}).mouseup (function () {
		jQuery(this).css('opacity',1);
	}); */
/**********************************************************************************************************************************************************************************/
	/* Campos com limite de caracteres */
	jQuery('.verificaMaxLength').keyup(function () {
		if (jQuery(this).attr('maxlength') == jQuery(this).val().length) {
			jQuery(this).parent().find('.dica').addClass('erro');
		} else {
			jQuery(this).parent().find('.dica').removeClass('erro');
		}
	});
/**********************************************************************************************************************************************************************************/
	/* Varre os inputs,selects,checkbox e botões e adiciona o tabIndex */
	var tabIndex = 1;
	jQuery('input,textarea,select,button').each (function () {
		jQuery(this).attr('tabIndex',tabIndex).attr('autoComplete','off');
		tabIndex ++;
	});
/**********************************************************************************************************************************************************************************/
	jQuery('input,select,textarea').focusout (function () {
		if (jQuery(this).val() != '') {
			jQuery(this).parent().find('.hint').fadeOut(500,function () {
				jQuery(this).remove();
			});
		}
	});
});
