function santafe(data){
	$("#santafe").load(data);
}
function ajaxSantafe(form, condicao){
	formdata = $("#"+form).serialize();
	formurl= $("#"+form).attr('action');
	if(condicao == "submit"){
            $.ajax({type: "POST",
                    url: formurl,
                    data: formdata,
                    success: function(data) {
                    $("#"+form+'_ret').html(data);

                    }

            });
        }else{
            $.ajax({type: "POST",
                    url: formurl,
                    data: 'reset=reset',
                    success: function(data) {
                    $("#"+form+'_ret').html(data);

                    }

            });
            document.getElementById(form).reset();
        }
}

$(document).ready(function(){
	
	$("#telefone").mask("(99)9999-9999");
	$("#aniversario").mask("99/99/9999");


	$("#telefone2").mask("(99)9999-9999");
	$("#aniversario2").mask("99/99/9999");

	$("#submit").click(function(){
		return false;
	});
	    
	
$('#banners').cycle({ 
		fx:     'fade', 
		speed:  2000, 
		timeout: 6000,
		prev:   '#next', 
    		next:   '#prev'//, 
		//pager:  '#ultimasNoticiasPager',
		//pagerEvent: 'mouseover'
	});
	$('#banners_texto').cycle({ 
		fx:     'scrollHorz', 
		speed:  2000, 
		timeout: 6000,
		next:   '#prev', 
		prev:   '#next'//, 
		//pager:  '#ultimasNoticiasPager',
		//pagerEvent: 'mouseover'
	});

	$('#mais_fotos').cycle({ 
		fx:     'scrollVert', 
		speed:  2000, 
		timeout: 6000
		//, 
		//pager:  '#ultimasNoticiasPager',
		//pagerEvent: 'mouseover'
	});

	
	$(function() {
		$(".fade_03").css("opacity","0.3");
		$(".fade_03").hover(function () {
			
		$(this).stop().animate({opacity: 1.0}, "slow")},
		
		function () {		
			$(this).stop().animate({opacity: 0.3}, "slow");
		});

	});
	
	$(function() {
		$(".fade_05").css("opacity","0.5");
		$(".fade_05").hover(function () {
			
		$(this).stop().animate({opacity: 1.0}, "slow")},
		
		function () {		
			$(this).stop().animate({opacity: 0.5}, "slow");
		});

	});
	
	$(function() {
		$(".fade_07").css("opacity","0.7");
		$(".fade_07").hover(function () {
			
		$(this).stop().animate({opacity: 1.0}, "slow")},
		
		function () {		
			$(this).stop().animate({opacity: 0.7}, "slow");
		});

	});
	
	$(function() {
		$("#topo > a").css("opacity","0.7");
		$("#topo > a").hover(function () {
			
		$(this).stop().animate({opacity: 1.0})},
		
		function () {		
			$(this).stop().animate({opacity: 0.4});
		});

	});

	
	$(function() {
		//Get our elements for faster access and set overlay width
		var div = $('div.sc_menu'),
			ul = $('ul.sc_menu'),
			ulPadding = 15;
		
		//Get menu width
		var divWidth = div.width();

		//Remove scrollbars	
		div.css({overflow: 'hidden'});
		
		//Find last image container
		var lastLi = ul.find('li:last-child');
		
		//When user move mouse over menu
		div.mousemove(function(e){
			//As images are loaded ul width increases,
			//so we recalculate it each time
			var ulWidth = lastLi[0].offsetLeft + lastLi.outerWidth() + ulPadding;	
			var left = (e.pageX - div.offset().left) * (ulWidth-divWidth) / divWidth;
			div.scrollLeft(left);
		})
	});

});
