var active_color = '#ffffff'; // Colour of user provided text
var inactive_color = '#a8a8a8'; // Colour of default text

$(document).ready(function() {
  $("input.default-value").css("color", inactive_color);
  var default_values = new Array();
  $("input.default-value").focus(function() {
    if (!default_values[this.id]) {
      default_values[this.id] = this.value;
    }
    if (this.value == default_values[this.id]) {
      this.value = '';
      this.style.color = active_color;
    }
    $(this).blur(function() {
      if (this.value == '') {
        this.style.color = inactive_color;
        this.value = default_values[this.id];
      }
    });
  });
});


function alertMessage(a){

	switch (a)
	{
	case 1:
		message = 'Your form was sent sucessfuly!';	
		break;
	case 0:
		message = 'There was an error. \nAllowable file types for CV : pdf, txt, doc , odf, zip ,rar.  \n\nPlease check your CV file and try again later!';
		break;
	case 2:
		message = 'There was an error. \nThe maximum filesize for the CV is 3 Mb.  \n\nPlease check your CV file and try again later!';
		break;
	}

	alert(message);
}