//My Script - Estevao Sarcinelli
//estevaosarcinelli.com.br 

// BOTAO SCROLLING
$(document).ready(function(){
	$(function () {
		$('#menuBox1').click(function () {
			$('body,html').animate({
				scrollTop: 0
			}, 800);
			return false;
		});
		$('#menuBox2').click(function () {
			$('body,html').animate({
				scrollTop: 0
			}, 800);
			return false;
		});
		$('#menuBox3').click(function () {
			$('body,html').animate({
				scrollTop: 625
			}, 800);
			return false;
		});
		$('#menuBox5').click(function () {
			$('body,html').animate({
				scrollTop: 1380
			}, 800);
			return false;
		});
		$('#quemSaoBtn').click(function () {
			$('body,html').animate({
				scrollTop: 1820
			}, 800);
			return false;
		});
	});
});



//SUBMENU DROPDOWN
	$(document).ready(function(){
	  TriggerClick = 0;
	
  $("#menuBox4").click(function(){
	if(TriggerClick==0){
		 TriggerClick=1;
		$('#subMenu').animate({
			top: 148
			}, 300, function() {
		  });
		$('#babado').animate({
			top: 193
			}, 300, function() {
		  });
		$('#box1').animate({
			'padding-top': 245
			}, 300, function() {
		  });
		$('#headSpace').animate({
			'height': 245
			}, 300, function() {
		  });
	}else{
		 TriggerClick=0;
		$('#subMenu').animate({
			top: 103
			}, 300, function() {
		  });
		$('#babado').animate({
			top: 145
			}, 300, function() {
		  });
		$('#box1').animate({
			'padding-top': 200
			}, 300, function() {
		  });
		$('#headSpace').animate({
			'height': 200
			}, 300, function() {
		  });
		};
	});
});



//CONTATO DROP "UP"
	$(document).ready(function(){
	  TriggerClick = 0;
	
  $("#menuBox6").click(function(){
	if(TriggerClick==0){
		 TriggerClick=1;
		$('#footer').animate({
			height: 290
			}, 300, function() {
		  });
		$('#footerDefault').slideUp(300);
		$('#footerForm').slideDown(300);
		$('#cactusWrapper1').animate({
			height: 456
			}, 300, function() {
		  });
		$('#cactusWrapper2').animate({
			height: 284
			}, 300, function() {
		  });
	}else{
		 TriggerClick=0;
		$('#footer').animate({
			height: 50
			}, 300, function() {
		  });
		$('#footerDefault').fadeIn(300);
		$('#footerForm').slideUp(300);
		$('#cactusWrapper1').animate({
			height: 216
			}, 300, function() {
		  });
		$('#cactusWrapper2').animate({
			height: 44
			}, 300, function() {
		  });
		};
	});
});


//banner principal index
//NIVO SLIDER
$(window).load(function() {
	$('#slider').nivoSlider();
});


//clientes
//jCAUROUSSEL
$(function() {
    $("#clientesCaroussel").jCarouselLite({
        btnNext: ".next",
        btnPrev: ".prev",
		speed: 400
    });
});



//PLUS ONE BUTTON
window.___gcfg = {lang: 'pt-BR'};
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();



//fotos do escritorio
// CYCLE ALL
$('#sala').cycle({ 
    fx:     'fade', 
    speed:   300, 
    timeout: 3000, 
    next:   '#sala', 
    pause:   1 
});





