$(document).ready(function () {

// Script para abrir as informações dos eventos

	$('.gatilho-eventos').click(function(){
	$(this).children('div').slideToggle('fast');
	});


// Script para as Tabs das páginas internas
	$('.nav-tabs a').click(function(event){
		event.preventDefault();
		var id = $(this).attr('href');
		
		$('.nav-tabs a').removeClass('active-tab');
		$(this).addClass('active-tab');
		
		$('#tabs').children().hide(200, function(){
			$(id).fadeIn(200);
		});
	});
	 
// Script para o menu de navegação superior
	$('.topnav li').hover(
		function () {
			$(this).addClass('hover');
			$('ul', this).slideDown(200);
		}, 
		function () {
			$(this).removeClass('hover');
			$('ul', this).slideUp(0);
		}
	);
	
// Script para o Parallax do header
	Parallax({
        'elements': [
          {
            'selector': 'div.fundo',
            'properties': {
              'x': {
                'background-position-x': {
                  'initial': -50,
                  'multiplier': -0.05
                }
              },
              'y': {
                'background-position-y': {
                  'initial': 20,
                  'multiplier': 0,
                }
              }
            }
          },
          {
            'selector': 'div.frente',
            'properties': {
              'x': {
                'background-position-x': {
                  'initial': -25,
                  'multiplier': 0.1
                }
              },
              'y': {
                'background-position-y': {
                  'initial': 240,
                  'multiplier': 0,
                }
              }
            }
          },
          {
            'selector': 'div.logo',
            'properties': {
              'x': {
                'background-position-x': {
                  'initial': 60,
                  'multiplier': -0.05
                }
              },
              'y': {
                'background-position-y': {
                  'initial': 0,
                  'multiplier': 0.00,
                }
              }
            }
          },
          {
            'selector': 'div.homem',
            'properties': {
              'x': {
                'left': {
                  'initial': 0,
                  'multiplier': -0.1
                }
              },
              'y': {
                'top': {
                  'initial': 0,
                  'multiplier': 0
                }
              }
            }
          }
        ]
    });
});
