
  $("div#footer p").append("&trade;");
	$("div#footer p").replaceWith("<p>Copyright &copy; 2011 <strong>whatever</strong>projects&trade;</p>");
	
	
	(function($) {
  var cache = [];
  // Arguments are image paths relative to the current page.
  $.preLoadImages = function() {
    var args_len = arguments.length;
    for (var i = args_len; i--;) {
      var cacheImage = document.createElement('img');
      cacheImage.src = arguments[i];
      cache.push(cacheImage);
    }
  }
})(jQuery)


jQuery.preLoadImages("../images/facebook_hover.png", "../images/Submit_hover.png", "../images/Download_hover.png", "../images/mapin.png");

/* Client */
$('.error').hide();
$('.numbers .nav a').click(function() {
				$(this).addClass("activeSlide");
				$(this).siblings().removeClass("activeSlide");
			    var id = $(this).attr("id");
			    $(".slider img.current").fadeOut(300).removeClass("current");
			    $(".slider img#" + id).delay(300).fadeIn().addClass("current");
				
				
});


/* Showcase Home */


$('.home_overlay .nav a').click(function() {
				$(this).addClass("activeSlide");
				$(this).siblings().removeClass("activeSlide");
			    var id = $(this).attr("id");
			    $("#showcase img.current, #client_info_home .current").fadeOut(300).removeClass("current");
			    $("#showcase img#" + id +" , #client_info_home div#client"+id).delay(500).fadeIn(200).addClass("current");
				
				
});

/* Client Button Cover */

	$(".cover").fadeTo(0, 0.5);	
	$(".cover").mouseenter(function () {
    $(this).fadeTo("fast", 0);
  }).mouseleave(function () {
    $(this).fadeTo("fast", 0.5);
  });
  
  
/* Contact Form */



    // assuming all checkboxes are unchecked at first
    $("span[class='checkbox']").addClass("unchecked");
    
        $(".checkbox").click(function(){
    
            if($(this).children("input").attr("checked")){
                // uncheck
                $(this).children("input").attr({checked: ""});
                $(this).removeClass("checked");
                $(this).addClass("unchecked");
            }else{
                // check
                $(this).children("input").attr({checked: "checked"});
                $(this).removeClass("unchecked");
                $(this).addClass("checked");
            }
    
            
        });
   
    

    
    
    
        
 
  $('.error').hide();  
  $(".button").click(function() {  
    // validate and process form here  
  
    $('.error').hide();  
      var name = $("input#name").val();  
        if (name == "") {  
      $("span#name_error").show();  
      $("input#name").focus();  
      return false;  
    }  
    
    var lname = $("input#lname").val();  
        if (lname == "") {  
      $("span#lname_error").show();  
      $("input#lname").focus();  
      return false;  
     
    }
    
        var email = $("input#email").val();  
        if (email == "") {  
      $("span#email_error").show();  
      $("input#email").focus();  
      return false;  
     
    }
   
    var phone = $("input#phone").val(); 
    
        if (document.getElementById("callback").checked==true && phone == "") {  
              $("span#phone_error").show();  
            $("input#phone").focus();  
      return false;  
     
    }  
    
    var dataString = $(".contactform form").serialize();  
    alert (dataString);return false;  
    $.ajax({  
      type: "POST",  
      url: "http://whateverprojects.com/new-website-demo/bin/process.php",  
      data: dataString,  
      success: function() {  
        $('#contact_form').html("<div class='container' id='message'></div>");  
        $('#message').html("<h2>Contact Form Submitted!</h2>")  
        .append("<p>We will be in touch soon.</p>")  
        .hide()  
        .fadeIn(1500, function() {  
          $('#message');  
        });  
      }  
    });  
    return false;
    
	
  
  });  



		
	
	
				
	

