// JavaScript Document	$.fn.scrollToAbsolute = function(topInPixels) {	return this.each(function(){	  $(this).click(function(){			$.scrollTo(topInPixels, 500);			return false;    });  });};$.fn.shakeInputIfInvalid = function() {		if ($(this).val() == "") {			$(this).effect("shake", { times:3 }, 75);			return false;		}	else {			return true;		}};$(function () {  $('a#WeDoWebapps').scrollToAbsolute('629px');  $('a#Team').scrollToAbsolute('1258px');  $('a#WeAreGood').scrollToAbsolute('1887px');  $('a#WeHelped').scrollToAbsolute('2516px');	$('ul#Folio a').click(function() {		var portDiv = $('div#FolioShot');		portDiv.empty();		portDiv.html('<img src=\"images/portfolio/' + $(this).attr('href') + '\" />');		portDiv.show();		return false;	});	$('div#FolioShot').click(function() {		$('div#FolioShot').fadeOut(100);		return false;	});	$('a#LetsTalk').click(function() {		$('div#Bottom').hide();		$('div#ContactUs').show();		return false;	});	$('form#Contact').submit(function() {		nameValid = $("input#Name").shakeInputIfInvalid();		mailValid = $("input#EmailOrPhone").shakeInputIfInvalid();		messageValid = $("textarea#TheMessage").shakeInputIfInvalid();		if (nameValid && mailValid && messageValid) {			$.ajax({	      type: 'POST',	      url: $(this).attr('action'),	      data: $(this).serialize(),	      success: function() {					$('div#ContactUs').hide();					$('div#SubmitOK').show();	      },	      error: function(xhr, textStatus, errorThrow) {					$('div#ContactUs').hide();					$('div#SubmitFail').show();	      }	    });			}			return false;	});});
