$(document).ready(function(){
	
	/* Not relevant due to ajax mega-change
	//Set default open/close settings
	$('.modules-container').hide(); //Hide/close all containers
	
	//On Click
	$('.modules-trigger').live('click', function(){
		if( $(this).next().is(':hidden') ) { //If immediate next container is closed...
			$('.modules-trigger').removeClass('active').next().slideUp(); //Remove all .acc_trigger classes and slide up the immediate next container
			$(this).toggleClass('active').next().slideDown(); //Add .acc_trigger class to clicked trigger and slide down the immediate next container
		}
		else {
			$(this).next().slideUp();
			$('.modules-trigger').removeClass('active').next().slideUp();
		}
		return false; //Prevent the browser jump to the link anchor
	});*/
	
	$('#teaser-link').click(function(){
		if(	$('#teaser-link').hasClass('selected')){
			$('#teaser-link').removeClass('selected');
			$('#flash-teaser-container').animate({
				'margin-top': '+='+$('#flash-teaser-container').height(),// '+=500',
				'opacity': 1
			}, 1000, function() {
				// Animation complete.
			});
			$('.teaser-contact').fadeOut('slow', function() {
				// Animation complete
			  });
			return false;
		}
		else{
			$('#teaser-link').addClass('selected');
			$('#flash-teaser-container').animate({
				'margin-top': '-='+$('#flash-teaser-container').height(),// '+=500',//'margin-top': '-=500',
				'opacity': 0
			}, 1000, function() {
				// Animation complete.
			});
			$('.teaser-contact').fadeIn('slow', function() {
				// Animation complete
			  });
		}
		
		return false; //Prevent the browser jump to the link anchor
	});

});

