/* */
$(function() {
	$('a.lightbox').lightBox();
});
$(function() {
	$('a[@rel*=lightbox]').lightBox({
		overlayBgColor: '#000',
		overlayOpacity: 0.8,
		/*
		imageLoading: '../_imgs/loading.gif',
		imageBtnClose: '../_imgs/close.gif',
		imageBtnPrev: '../_imgs/prev.gif',
		imageBtnNext: '../_imgs/next.gif',
		*/
		containerResizeSpeed: 350,
		txtImage: 'Imagem',
		txtOf: 'de'
   });
});
function abrepop(url,nome,dados) {
  window.open(url,nome,dados);
}
function textOn(txt){
	document.getElementById(txt).className="textboxOn";
}
function textNormal(txt){
	document.getElementById(txt).className="textbox";
}
function clearText(e, txt) {
	if(e.value == txt) {
		e.value = '';
	}
}
function recoverText(e, txt) {
	if(e.value.length == 0) {
		e.value = txt;
	}
}

$(function(){
	$('a.iToolTips').tooltip({
		track: true,
		delay: 0,
		showURL: false
	});
	$('a.eToolTips').tooltip({
		track: true,
		delay: 0,
		showURL: false,
		showBody: ":"
	});
});

//Formulario
$(document).ready(function() {
	$("#ctdErro").corner("8px");
});

function customValidation(){
	return jQuery.validate({
		fieldset: "#customErrorCallback",
		usedefault: true,
		onerror: function(err){
			alert("message: " + err[0].msg + " \n type: " + err[0].type + " \n id: " + err[0].id);
			$("body").css({background: "#ff0000"})
		}
	});
};
$(document).ready(function(){
	// Set item title to default value
	$("input[type=text]").each(function(i, item){
		$(item).val($(item).attr("title"));
	})
})

