$(document).ready(function(){

    $('.button-collapse').sideNav();
    $('.parallax').parallax();
	$('.carousel').carousel();
	$('.modal-trigger').leanModal();    
	$(".dropdown-button").dropdown();
	$('.slider').slider({full_width: true});
    $('.modal-trigger').leanModal();
    $('.collapsible').collapsible({
      accordion : false // A setting that changes the collapsible behavior to expandable instead of the default accordion style
    });

	$('.tooltipped').tooltip({delay: 50});
 
    var options = [{
     	selector: '.anima', offset: 00, callback: function() {
     		$('#animalogo').animateCss('bounceInRight'); 
     			$('#texto').animateCss('fadeInUp');        
     	}},
     ];       

    /* $(document).scroll(function(){
 		var postnav = document.body.scrollTop;

 			console.dir(postnav);
 		if(postnav > 200){
 			$('nav').removeClass('transparent').addClass('white');
 		} else {
 			$('nav').removeClass('white').addClass('transparent');
 		}

     }); */

 /* var options = [ { selector: '#animalogo', offset: 500, callback: function(el) { 
     	Materialize.fadeInImage($(el)); } 
     } ]; */


     Materialize.scrollFire(options);   

	$('.scrollspy').scrollSpy();
   
$('.slider').slider({full_width: true});

$.fn.extend({
    animateCss: function (animationName) {
        var animationEnd = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';
        $(this).addClass('animated ' + animationName).one(animationEnd, function() {
            $(this).removeClass('animated ' + animationName);
        });
    }
});

}); // end of jQuery name space
