//jquery

	function mycarousel_initCallback(carousel)	{
		
		
		
		 jQuery('.clientes .right').bind('click', function() {
			carousel.next();
			return false;
		});
		jQuery('.clientes .left').bind('click', function() {
			carousel.prev();
			return false;
		})
		
		
		
		
		// Disable autoscrolling if the user clicks the prev or next button.
		carousel.buttonNext.bind('click', function() {
			carousel.startAuto(0);
		});
		carousel.buttonPrev.bind('click', function() {
			carousel.startAuto(0);
		});
		// Pause autoscrolling if the user moves with the cursor over the clip.
		carousel.clip.hover(function() {
			carousel.stopAuto();
		}, function() {
			carousel.startAuto();
		});
		
		
	};
$(function(){











	$.ajax({
		url : url_site+'resumo.php',
		success: function(data){
			$('#cambioLoad').append(data);
			$('#cambioLoad #cambio').prepend('<h3>Câmbio Hoje</h3>');
			$('#cambioLoad #cambio tbody tr td').each(function(){
				//alert($(this).find('span').html());
				if($(this).find('span').html() != null){
					var t = $(this).find('span');
					var pct = '%';
				} else {
					var t = $(this);
					var pct = '';
				}
				var v = $(this).text();
				v = roundNumber(v,2);
				t.html(v+pct);
				//alert(v);
			});
		}
	});











	jQuery('#mycarousel').jcarousel({
		scroll : 3,
		animation : 'slow',
		auto: 3,
		wrap: 'circular',
		initCallback: mycarousel_initCallback
	});
















	$('#id').inputFocus('CPF/CNPJ','#198AB8',false);
	//$('#agendamento_senha').inputFocus('Senha','#198AB8',false);

















	$('.square-list li a').hover(function(){
		$(this).find('.hover').fadeIn('fast');
	},function(){
		$(this).find('.hover').fadeOut('fast');
	});














	//$gm->SetAddress('', '-26.9033363', '-48.671013');
	$("#mapa").gMap({
		zoom:16,
		controls:['GLargeMapControl','GMapTypeControl'],
		scrollwheel:false,
		markers:[{
			latitude: -26.9033363,
			longitude: -48.671013,
			icon:{
				image: url_site+"images/gmap_marker.png",
				shadow: false,
				iconsize: [32, 32],
				shadowsize: false,
				iconanchor: [16, 32],
				infowindowanchor: [2, 2]
			}
		}]
	});















	$("a.prettyPhoto").prettyPhoto({
		animationSpeed:'slow',
		theme:'facebook',
		slideshow:3000,
		autoplay_slideshow: false
	});





















	$('#rotativo').before('<div id="nav-banner"></div>').cycle({
		fx: 'fade',
		speed: 500,
		timeout: 7000,
		pager:'#nav-banner'
	});



});
