// JavaScript Document
$(document).ready(function() {
	
	$("#trigger").trigger("click");

$('.tabs a').click(function(){
	switch_tabs($(this));
	return false;
});
		 
	switch_tabs($('.defaulttab'));

	
	$(".sliders").cycle({
		fx:     'turnUp', 
		speed:  '300', 
		timeout: 5000, 
		next:   '#next2', 
		prev:   '#prev2',
		before: somarUm
		
	
	});
	
	function somarUm() {
	
	   var idprop = $('.mma').attr("id");
	   var caminho = path + 'count/countView/' + idprop;
		
		$.ajax({
			url: caminho,
			sucess: function(){
				idprop = '';
			}
		});
	}        

	
        
       
 $('cadastrar').click(function(){});
	
	$("#msg").cycle({
		fx:			'fade',
		speed:		'fast',
		timeout:	5000,
		next:		'#next2',
		prev:		'#prev2',
		cleartype: true, 
		cleartypeNoBg: true
	});
	
/*	$('#slider-bg').cycle({
		fx:			'fade',
		speed:		'fast',
		timeout:	5000,
		next:		'#next2',
		prev:		'#prev2',
	});*/
	
	$(".parceiro-rotator").cycle({
		fx:     'scrollLeft', 
		speed:  'fast', 
		timeout: 5000, 
		next:   '#next', 
		prev:   '#prev'
	
	});
	
	
	
	
});
		function switch_tabs(obj) {
				$('.tab-content').hide();
				$('.tabs a').removeClass("selected");
				var id = obj.attr("rel");
			 
				$('#'+id).show();
				obj.addClass("selected");
		    }
			
