
	// ------------------------------------------------------------ //
	
		// NOVOFLOW MODULES
	
	// ------------------------------------------------------------ //
	
	
	// BACKGROUND ANIMATION -------------------------------------------------- //
	var speed = 60; // speed of the bokeh animation
	var move = 1; // how many steps should the bokeh move
	var current = 0; // current postion of bokeh
	var image = 20000; // bokeh size

	var startPoint = image;

	function animation(){
		current -= move;
		if (current == startPoint){
			current = 0;
		}
		
		// down to top animation
		$('#lowerBokeh').css("background-position",  "0 "+current+"px");
		
		//right to left animation
		$('#upperBokeh').css("background-position", current+"px 0");
	}

	var init = setInterval("animation()", speed);
	// BACKGROUND ANIMATION -------------------------------------------------- //
	
	
	
	
	
	
	// COUNTER -------------------------------------------------- //
	$(function () {
			var liftoffTime = new Date(2010, 11 -1, 15, 19, 40);
			$('#countdown').countdown({until: liftoffTime});
	});
	// COUNTER -------------------------------------------------- //
	
	
	
	
	
	// NEWSLETTER OPEN/CLOSE (change the speed if you like) -------------------------------------------------- //
	// open newsletter
	function openEmail(){$('#newsletter').fadeIn(700);}
	
	
	// close newsletter
	function closeEmail(){$('#newsletter').fadeOut(700);}
    // NEWSLETTER OPEN/CLOSE -------------------------------------------------- //
   
   
   
   
   
    // SEND NEWSLETTER FORM -------------------------------------------------- //
	$(document).ready(function(){
	  $("#newsletter-form").submit(function(){
		  var str = $(this).serialize();
		  $.ajax({
			  type: "POST",
			  url: "newsletter/contact.php",
			  data: str,
			  success: function(msg){
				$("#note").ajaxComplete(function(event, request, settings){
			  
				if(msg == 'OK'){ // EMAIL Sent? Show 'Thank You' message and hide the form
					result = '<div class="notification_ok">Sua mensagem foi enviada. Obrigado!</div>'; //You can change this text
					$("#fields").hide();
				}
				else{
					result = msg;
				}
					$(this).html(result);
				});
			  }
	  	  });
	  		return false;
	  	});
	 });
	 // SEND NEWSLETTER FORM -------------------------------------------------- //

