$(document).ready(function() {
$("#editlink").click(function() {
$("#editlink").hide();
  $("#notes").addClass('addborder');
//  alert('Handler for .click() called.');

});

	$("#tabs").tabs();
	
	
	
	$("#regform").validationEngine({
				ajaxSubmit: true,
					ajaxSubmitFile: "leftAjaxSubmit.php",
					ajaxSubmitMessage: "<p>Thank you for completing our HP Lefthand form, we will contact you shortly.</p><p>Or you can call us on:<br><strong>+44(0)1753 478333</strong></p>",
				success :  function() { 	$("#regform").submit(function() {

		var $inputs = $('#regform :input');
		var values = {};
			$inputs.each(function() {
			values[this.name] = $(this).val();
		});
		

		return false;  
	}); }, 
				failure : function() {}
			})
			
			
	
					$("#appliedrec").validationEngine({
				ajaxSubmit: true,
					ajaxSubmitFile: "friendajaxSubmit.php",
					ajaxSubmitMessage: "<p><strong>Thank you for completing our share form. <a href='http://www.applied-tech.co.uk/recommend-applied-tech.html'>Do you want to send another recommendation?</a></STRONG><p><p>Your email was succesfuly sent to your friend.</p><p>If you have an enquiry, please call us on: +44(0)1753 478333, or email: <a href='mailto:info@applied-tech.co.uk'>info@applied-tech.co.uk</a></p>",
				success :  function() { 		$("#appliedrec").submit(function() {  
		var $inputs = $('#appliedrec :input');
		var values = {};
			$inputs.each(function() {
			values[this.name] = $(this).val();
		});
		

		return false;  
	}); }, 
				failure : function() {}
			})
	

				$("#ibmstoragerecomend").validationEngine({
				ajaxSubmit: true,
					ajaxSubmitFile: "IBMrecommendajaxSubmit.php",
					ajaxSubmitMessage: "<p><strong>Thank you for completing our share form. <a href='http://www.applied-tech.co.uk/system-storage-event/recommend-a-friend'>Do you want to send another invitation?</a></STRONG><p><p>Your email was succesfuly sent to your friend. If you have an enquiry, please call us on: +44(0)1753 478333, or email: <a href='mailto:info@applied-tech.co.uk'>info@applied-tech.co.uk</a></p>",
				success :  function() { 		$("#ibmstoragerecomend").submit(function() {  
		var $inputs = $('#ibmstoragerecomend :input');
		var values = {};
			$inputs.each(function() {
			values[this.name] = $(this).val();
		});
		

		return false;  
	}); }, 
				failure : function() {}
			})
	
	
			$("#sideform").validationEngine({
				ajaxSubmit: true,
					ajaxSubmitFile: "ajaxSubmit.php",
					ajaxSubmitMessage: "<p><strong>Thank you for completing our contact form. </STRONG><p><p>One of our team will be in touch shortly.  If your enquiry is urgent, please call us on: +44(0)1753 478333, or email: <a href='mailto:info@applied-tech.co.uk'>info@applied-tech.co.uk</a></p>",
				success :  function() { 		$("#sideform").submit(function() {  
		var $inputs = $('#sideform :input');
		var values = {};
			$inputs.each(function() {
			values[this.name] = $(this).val();
		});
		

		return false;  
	}); }, 
				failure : function() {}
			})
			
			$("#bodyform").validationEngine({
				ajaxSubmit: true,
					ajaxSubmitFile: "ajaxSubmit.php",
					ajaxSubmitMessage: "<p>Thank you for completing our contact form, we will contact you shortly.</p><p>Or you can call us on:<br><strong>+44(0)1753 478333</strong></p><p>As you navigate through the site the form will reappear to allow you to submit further enquiries</p>",
				success :  function() { 	$("#bodyform").submit(function() {

		var $inputs = $('#bodyform :input');
		var values = {};
			$inputs.each(function() {
			values[this.name] = $(this).val();
		});
		

		return false;  
	}); }, 
				failure : function() {}
			})
			
			$("#hpform").validationEngine({
				ajaxSubmit: true,
					ajaxSubmitFile: "hpajaxSubmit.php",
					ajaxSubmitMessage: "<p><strong>Thank you for completing our contact form. </STRONG><p><p>One of our team will be in touch shortly.  If your enquiry is urgent, please call us on: +44(0)1753 478333, or email: <a href='mailto:info@applied-tech.co.uk'>info@applied-tech.co.uk</a></p>",
				success :  function() { 	$("#hpform").submit(function() {

		var $inputs = $('#hpform :input');
		var values = {};
			$inputs.each(function() {
			values[this.name] = $(this).val();
		});
		

		return false;  
	}); }, 
				failure : function() {}
			})		
			
			
		$("#eventoctober").validationEngine({
				ajaxSubmit: true,
					ajaxSubmitFile: "IBMajaxSubmit.php",
					ajaxSubmitMessage: "<p>Thank you for registering for this event, your registration has been received.<br />You will receive an e-mail shortly with more event details.</p><p>If your enquiry is urgent, please call us on: +44(0)1753 478333, or email: <a href='mailto:info@applied-tech.co.uk' target='_blank'>info@applied-tech.co.uk</a></p>",
				success :  function() { 	$("#eventoctober").submit(function() {

		var $inputs = $('#eventoctober :input');
		var values = {};
			$inputs.each(function() {
			values[this.name] = $(this).val();
		});
		

		return false;  
	}); 
	
goToByScroll('ultabs');

	}, 
				failure : function() {}
			})			
			
		
	
	$('.default-value').each(function() {
		var default_value = this.value;
		$(this).focus(function() {
			if(this.value == default_value) {
				this.value = "";
			}
		});
			
		$(this).blur(function() {
			if(this.value == "") {
				this.value = default_value;
			}
		});
	}); 

	$('#quickflip').quickFlip();
	
	$('.first').click( function(ev) {
		$('#quickflip').quickFlipper({},1);
	});

	$('#accordionboxes').accordion({
		autoheight: true,
		active: 0
			});

	$('.second').click( function(ev) {
		$('#quickflip').quickFlipper({},0);
	});

	$('.third').click( function(ev) {
		$('#quickflip').quickFlipper({},1);
	});

	$('#columnshadow').css('height',$('#contentinner').height());
	
	if ($('#contentinner').height() > 1000){
		$('#columnshadow').css('backgroundImage','url(/assets/images/rightColumnShadowLong.gif)');
	}
	else{
		$('#columnshadow').css('backgroundImage','url(/assets/images/rightColumnShadow.gif)');
	}
}); 
