//mascara no form
function limparPadrao(campo) {
	if (campo.value == campo.defaultValue) {
			campo.value = "";
	}
}

function escreverPadrao(campo) {
	if (campo.value == "") {
			campo.value = campo.defaultValue;
	}
}

//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

//slide
$(function(){
	$(".slide ul").cycle({
		fx: 'fade',
		speed: 500,
		timeout: 5000,
		pager:  '#nav'
	});      
});

//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

//scroll nos servicos
$(function(){
	$("#content_serv").jCarouselLite({
		auto    : 1000,
		speed   : 1000,
		visible : 7,
		btnPrev : '.prev',
		btnNext : '.next'
	})
})

//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

/* target html */
$(document).ready(function() {
  $('a[rel = external]').attr('target', '_blank');
});

//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

/**
 * anchor animate
 *
 * Copyright (c) 2010 Renato Neto
 * renato_neto.mr@hotmail.com
 * http://atualizeseuconhecimento.com.br/
 */
(function($) {
	
	function rand(min, max) {
		return Math.floor((Math.random() * (max - min + 1)) + min);
	}
	
	var defaults = {
		'randMin': 100,
		'randMax': 2000,
		'time':	1000
	};
	
	$(function() {
		
		var settings = $.extend(defaults, animate); 

		$('a.animate').click(function(e) {
			e.preventDefault();

			var obj = $(this);
			var time = settings.time;

			if(obj.hasClass('rand')) {

				time = rand(settings.randMin, settings.randMax);

			} else {

				var result = /time[0-9]+/.exec(obj.attr('class'));
				if(result)
					time = parseInt(new String(result).replace('time', ''));

			}

			$('html, body').animate({
				scrollTop: $(obj.attr('href')).offset().top
			}, time);

		});
	
	});


})(jQuery);

//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

//COLORBOX
$(document).ready(function(){
	//Examples of how to assign the ColorBox event to elements
	$("a[rel='example1']").colorbox();
	$(".example7").colorbox({width:"60%", height:"90%", iframe:true});
});










