// remap jQuery to $
(function($){

$(document).ready(function (){

	var $name = $("input#name").val();
	var $email = $("input#email").val();
	var $phone = $("input#phone").val();
	var $verify = $("input#verify").val();

	$("#contact input").click(function() {	
		
		if ( ($(this).val() === $name) || ($(this).val() === $email) || ($(this).val() === $phone) || ($(this).val() === $verify)  )
	    {
	    
	        $(this).val("");
	        
	    }
			
			

	});

	$("#contact input").blur(function() {

		if ( ($(this).attr("id") === "name") && ($(this).val() === '') )
	    {
	
	        $(this).val($name);
	        
	    }
		else if ( ($(this).attr("id") === "email") && ($(this).val() === '') )
	    {
	
	        $(this).val($email);
	
	    }
		else if ( ($(this).attr("id") === "phone") && ($(this).val() === '') )
	    {
	
	        $(this).val($phone);
	
	    }
	    
		
		else if ( ($(this).attr("id") === "verify") && ($(this).val() === '') )
	    {
	
	        $(this).val($verify);
	        
	    }

	});
	
	var active_color = '#FFF'; // Colour of user provided text
	var inactive_color = '#FFF'; // Colour of default text
	
	$("textarea.default-value").css("color", inactive_color);
  var default_values = new Array();
  $("textarea.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];
      }
    });
  });


/* INITIATE LIGHTBOX
------------------------------------------------------------ */

/* 	$('.lightbox').lightbox(); */

 
/* HOVER EXAMPLE
------------------------------------------------------------ */

/*
	$(".logo-left, .logo-right").hover(function() {

		$(".logo-left, .logo-right").stop(true, true).fadeTo( 300, 1.0);	
	
	},function() {

		$(".logo-left, .logo-right").stop(true, true).fadeTo( 300, 0.8);

	});
*/





/* FADING & COLOUR ANIMATE EXAMPLE
------------------------------------------------------------ */

/*
	$(".nav ul li .hover-bkg").hide();
	
	$(".nav ul li").hover(function() {

		$(this).find("a").stop(true, true).animate({ color: "#fff" }, 300);
		$(this).find(".hover-bkg").stop(true, true).fadeTo( 300, 1.0);	
	
	},function() {

		$(this).find("a").stop(true, true).animate({ color: "#b4b29e" }, 300);
		$(this).find(".hover-bkg").stop(true, true).fadeTo( 300, 0.0);	

	});
*/




/* EXAMPLE OF AN IF STATEMENT
------------------------------------------------------------ */


    /* GET BODY ID */

/*     var bodyid = $("body").attr("id"); */


    /* APPLY ACTIVE STYLES ACCORDING TO PAGE */

/*
    if (bodyid == 'page-index')
    {

        $('.nav ul li.first').removeClass('first').addClass('first-active');

    }

    else if (bodyid == 'page-about')
    {

        $('.nav ul li.about').addClass('active');

    }
*/





 

});

})(window.jQuery);
