/* Slide home */
$(document).ready(function(){        
    $('#slide ul').cycle({ 
        pager:  '#slide_pager',
        speed:   400, 
        timeout: 5000 
    });
});



/* Last Itens */
$(document).ready(function(){ 
    $(".box_cliente:nth-child(4n)").addClass("no_margin");
    $(".box_produto:nth-child(4n)").addClass("no_margin");
});



/* Slide Produtos/Clientes */
$(document).ready(function(){
    $(".slide_produtos").jCarouselLite({
        btnNext: ".slide_next",
        btnPrev: ".slide_prev",
        auto: 10000
    });
});

$(document).ready(function(){  
    $(".slide_clientes").jCarouselLite({
        btnNext: ".slide_next2",
        btnPrev: ".slide_prev2",
        auto: 10000
    });
});

$(document).ready(function(){  
    $(".slide_produtos_sidebar").jCarouselLite({
        btnNext: ".slide_next3",
        btnPrev: ".slide_prev3",
        visible: 1,
        scroll: 1,
        auto: 10000
    });
});



/* Bordas */
$(document).ready(function(){ 
    $(".home_depoimentos").corner();
});



/* Cufon */
Cufon.replace('.cufon_amareloDegrade', {color: '-linear-gradient(#FFFF33, #CCCC00)', textShadow: '#844900 1px 1px' });
Cufon.replace('.cufon_cinzaDegrade', {color: '-linear-gradient(#fff, #ccc)', textShadow: '#844900 1px 1px' });



/* Colorbox */
$(document).ready(function() {
    $(".colorbox").colorbox({
        width:  "818px", 
        height: "650px", 
        iframe: true
    });
    
    $(".colorbox_img").colorbox();
    $("a[rel='colorbox_grupo']").colorbox();
});



/* Scroll */
$(document).ready(function() {     
	$('.voltar_topo').click(function () {  
        $.scrollTo(this.hash, 1500);
		return false;  
	});  
});



/* Paginação */
$(document).ready(function() {
	$('#posts_sidebar').pajinate({
	   items_per_page : 6
	});
});


/* Formulários */
$(document).ready(function() {
    $('.validar').validate({
        errorLabelContainer: ".formulario_erro", 
        errorElement: "span"
	});
    
    $('.validar').ajaxForm({ 
        target: '.form_resposta', 
        resetForm: true,
        beforeSubmit: function() {
            $('.form_resposta').html('Aguarde...');
        }
    }); 
    
    $('.fone').mask("(99) 9999-9999");
});
