
function centerVertical(hash) {

	var currentTopOffset = $(window).scrollTop();
	var viewportHeight = $(window).height();
	var viewportWidth = $(window).width();

	var newTop = Math.round(currentTopOffset + ((viewportHeight / 2) - (hash.w.height() / 2)));
	var newLeft = Math.round((viewportWidth / 2) - (hash.w.width() / 2));

	hash.w.css("top", newTop);
	hash.w.css("left", newLeft);

}



$(document).ready(function() {
  $('#modal').jqm({
  	ajax: '@href', 
	trigger: 'a.modalLink',
	onLoad: centerVertical
	});
});


// VALIDATION SCRIPTS 

$(document).ready(function(){
    $("#freeQuote").validate();
  });

$(document).ready(function(){
    $("#contactus").validate();
  });
