
function blowUp(div){
	divID = '#'+div;
 $(divID).animate({
    height: '+=20',
	width: '+=20'
  }, 500);
  $(function() {})
}
	
	
	
function timer(){
 $('#colorboxes').animate({
    top: '-=1',
  }, 0);
  $(function() {})
}
	
	
function init(){	
	setInterval('timer()', 1);  
}
	
	
	
 $('.error').hide();  
  $(".signUpButton").click(function() {  
    // validate and process form here  
    $('.error').hide();  
    var email = $("input#email").val();  
        if (email == "") {  
      $("label#email_error").show();  
      $("input#email").focus();  
      return false;  
    }  
	
	 var name = $("input#fname").val();  
        if (name == "") {  
      $("label#fname_error").show();  
      $("input#fname").focus();  
      return false;  
    }  
	
	//var dataString = $("#signUp").serialize()
  var dataString = 'email=' + email + '&name=' + name;

$.ajax({  
  type: "POST",  
  url: "userSignUp.php",  
  data: dataString,  
  success: function() {  
    $('#signupForm').html("<div id='message' style='height:118px;'></div>");  
    $('#message').html("<p>We will be in touch.</p>")  
    .hide()  
    .fadeIn(1500, function() {  
    });  
  }
  
});  return false;  
  });   
  
  
var y = 0; //Starting Location - top
var dest_y = -1500;  //Ending Location - top
var interval = 1; //Move 10px every initialization
var scroller;


function moveImage() {
	//Keep on moving the image till the target is achieved 
	if(y>-1){scroller = -1;}
	if(y<dest_y){scroller = 1;}
	y = y + interval*scroller;
	
	//Move the image to the new location
	document.getElementById("colorBoxHolder").style.left  = y+'px';
	
		//Keep on calling this function every 100 microsecond 
		//	till the target location is reached
		setTimeout(moveImage,30);
	
}
function init() {
	moveImage();
}
	
	
	
	window.onload = init;
	
	
	
	
	
$('.error').hide();  
  $(".dossierButton").click(function() {  
    // validate and process form here  
    $('.error').hide();  
    var email = $("input#email").val();  
        if (email == "") {  
      $("label#email_error").show();  
      $("input#email").focus();  
      return false;  
    }  
	
	 var name = $("input#fname").val();  
        if (name == "") {  
      $("label#fname_error").show();  
      $("input#fname").focus();  
      return false;  
    }  
	
	var company = $("input#company").val();  
        if (company == "") {  
      $("label#company_error").show();  
      $("input#company").focus();  
      return false;  
    } 
	
	var phone = $("input#phone").val();  
        if (phone == "") {  
      $("label#phone_error").show();  
      $("input#phone").focus();  
      return false;  
    } 
	
	var time = $("input#time").val();  
        if (time == "") {  
      $("label#time_error").show();  
      $("input#time").focus();  
      return false;  
    } 
	var budget = $("input#budget").val();  
        if (budget == "") {  
      $("label#budget_error").show();  
      $("input#budget").focus();  
      return false;  
    } 
		var idea = $("textarea#idea").val();  
        if (idea == "") {  
      $("label#idea_error").show();  
      $("textarea#idea").focus();  
      return false;  
    } 
		var process = $("textarea#process").val();  
        if (process == "") {  
      $("label#process_error").show();  
      $("textarea#process").focus();  
      return false;  
    } 
    	var audience = $("textarea#audience").val();  
        if (audience == "") {  
      $("label#audience_error").show();  
      $("textarea#audience").focus();  
      return false;  
    } 
    	var size = $("textarea#size").val();  
        if (size == "") {  
      $("label#size_error").show();  
      $("textarea#size").focus();  
      return false;  
    } 
	
	
	
	
	
	//var dataString = $("#signUp").serialize()
  var dataString = 'email=' + email + '&name=' + name  + '&company=' + company + '&phone=' + phone + '&time=' + time + '&budget=' + budget + '&idea=' + idea + '&process=' + process + '&audience=' + audience + '&size=' + size;

$.ajax({  
  type: "POST",  
  url: "dossierInput.php",  
  data: dataString,  
  success: function() {  
    $('#signupForm').html("<div id='message' style='height:118px;'></div>");  
    $('#message').html("<p style='font-size:2em;'>Thanks for your information. We look forward to working and collaborating with you!</p>")  
    .hide()  
    .fadeIn(1500, function() {  
    });  
  }
  
});  return false;  
  });   
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
