 $(function(){
        $(document).ready(function(){				
			$('#formsubmit').click(function(){
				if( $('#form_name').val().length <= 0){
					$('#form_alert').html("<center><span style=\"color:red\"> Please tell us your name</span></center>");
					return false;
				}
				if ($('#form_email').val().length <= 0){
					$('#form_alert').html("<center><span style=\"color:red\"> Please tell us your email address</span></center>");
					return false;
				}
				if ($('#form_comment').val().length <= 0){
					$('#form_alert').html("<center><span style=\"color:red\"> Please tell us what is your question</span></center>");
					return false;
				}

				var url = "includes/submitmain.php?email=" + 
				
				$('#form_email').val() + "&name=" +

				$('#form_name').val() + "&msg=" +
				
				$('#form_comment').val();    
				
				
				$(location).attr('href',url);
			});	

			$('#contact_formsubmit').click(function(){

				if( $('#contact_form_name').val().length <= 0){
					$('#contact_form_alert').html("<center><span style=\"color:red\"> Please tell us your name</span></center>");
					return false;
				}
				if ($('#contact_form_email').val().length <= 0){
					$('#contact_form_alert').html("<center><span style=\"color:red\"> Please tell us your email address</span></center>");
					return false;
				} 
				if ($('#contact_form_comment').val().length <= 0){
					$('#contact_form_alert').html("<center><span style=\"color:red\"> Please tell us what is your question</span></center>");
					return false;
				}
				
				var url = "includes/submitmain.php?email=" + 
				
				$('#contact_form_email').val() + "&name=" +

				$('#contact_form_name').val() + "&msg=" +
				
				$('#contact_form_comment').val();    
				
				
				$(location).attr('href',url);
				
			});	
		
			$('#genenq_form_button').click(function(){

				if( $('#genenq_form_name').val().length <= 0){
					$('#genenq_form_alert').html("<center><span style=\"color:red\"> Please tell us your name</span></center>");
					return false;
				}
				if ($('#genenq_form_email').val().length <= 0){
					$('#genenq_form_alert').html("<center><span style=\"color:red\"> Please tell us your email address</span></center>");
					return false;
				} 
				if ($('#genenq_form_phone').val().length <= 0){
					$('#genenq_form_alert').html("<center><span style=\"color:red\"> Please tell us what is your phone number</span></center>");
					return false;
				}
 				if ($('#genenq_form_fault').val().length <= 0){
					$('#genenq_form_alert').html("<center><span style=\"color:red\"> Please tell us what is your question</span></center>");
					return false;
				}
 				
				
				var url = "includes/submitfailure.php?email=" + 
				
				$('#genenq_form_email').val() + "&name=" +

				$('#genenq_form_name').val() + "&msg=" +
				
				$('#genenq_form_fault').val() + 
				
				"&phone="+$('#genenq_form_phone').val()+"&make="+$('#genenq_form_make').val()+"&model="+$('#genenq_form_model').val();    
				
				
				$(location).attr('href',url);
				
	
				

			});	
			
			$('#laptop_form_button').click(function(){

				if( $('#genenq_form_name').val().length <= 0){
					$('#genenq_form_alert').html("<center><span style=\"color:red\"> Please tell us your name</span></center>");
					return false;
				}
				if ($('#genenq_form_email').val().length <= 0){
					$('#genenq_form_alert').html("<center><span style=\"color:red\"> Please tell us your email address</span></center>");
					return false;
				} 
				if ($('#genenq_form_phone').val().length <= 0){
					$('#genenq_form_alert').html("<center><span style=\"color:red\"> Please tell us what is your phone number</span></center>");
					return false;
				}
 				if ($('#genenq_form_fault').val().length <= 0){
					$('#genenq_form_alert').html("<center><span style=\"color:red\"> Please tell us what is your question</span></center>");
					return false;
				}
 
				$.ajax({
				  type: "POST",
				  url: "includes/submitlaptopfix.php",
				  data: "name=" + $('#genenq_form_name').val() + "&email="+$('#genenq_form_email').val()+"&msg=" +$('#genenq_form_fault').val()+"&phone="+$('#genenq_form_phone').val()+"&make="+$('#genenq_form_make').val()+"&model="+$('#genenq_form_model').val(),
				}).done(function( msg ) {
				  $('#genenq_form_div').html(msg);
				});
			});	
			
			$('#pc_form_button').click(function(){

				if( $('#genenq_form_name').val().length <= 0){
					$('#genenq_form_alert').html("<center><span style=\"color:red\"> Please tell us your name</span></center>");
					return false;
				}
				if ($('#genenq_form_email').val().length <= 0){
					$('#genenq_form_alert').html("<center><span style=\"color:red\"> Please tell us your email address</span></center>");
					return false;
				} 
				if ($('#genenq_form_phone').val().length <= 0){
					$('#genenq_form_alert').html("<center><span style=\"color:red\"> Please tell us what is your phone number</span></center>");
					return false;
				}
 				if ($('#genenq_form_fault').val().length <= 0){
					$('#genenq_form_alert').html("<center><span style=\"color:red\"> Please tell us what is your question</span></center>");
					return false;
				}
 
				$.ajax({
				  type: "POST",
				  url: "includes/submitpcfix.php",
				  data: "name=" + $('#genenq_form_name').val() + "&email="+$('#genenq_form_email').val()+"&msg=" +$('#genenq_form_fault').val()+"&phone="+$('#genenq_form_phone').val()+"&make="+$('#genenq_form_make').val()+"&model="+$('#genenq_form_model').val(),
				}).done(function( msg ) {
				  $('#genenq_form_div').html(msg);
				});
			});	
			
			$('#server_form_button').click(function(){

				if( $('#genenq_form_name').val().length <= 0){
					$('#genenq_form_alert').html("<center><span style=\"color:red\"> Please tell us your name</span></center>");
					return false;
				}
				if ($('#genenq_form_email').val().length <= 0){
					$('#genenq_form_alert').html("<center><span style=\"color:red\"> Please tell us your email address</span></center>");
					return false;
				} 
				if ($('#genenq_form_phone').val().length <= 0){
					$('#genenq_form_alert').html("<center><span style=\"color:red\"> Please tell us what is your phone number</span></center>");
					return false;
				}
 				if ($('#genenq_form_fault').val().length <= 0){
					$('#genenq_form_alert').html("<center><span style=\"color:red\"> Please tell us what is your question</span></center>");
					return false;
				}
 
				$.ajax({
				  type: "POST",
				  url: "includes/submitserverfix.php",
				  data: "name=" + $('#genenq_form_name').val() + "&email="+$('#genenq_form_email').val()+"&msg=" +$('#genenq_form_fault').val()+"&phone="+$('#genenq_form_phone').val()+"&make="+$('#genenq_form_make').val()+"&model="+$('#genenq_form_model').val(),
				}).done(function( msg ) {
				  $('#genenq_form_div').html(msg);
				});
			});	
			
			$('#custbuildsubmit').click(function(){
				$x = $('#custbuidname').val().length;
				if( $('#custbuidname').val().length <= 0){
					$('#custbuild_form_alert').html("<center><span style=\"color:red\"> Please tell us your name</span></center>");
					return false;
				}
				if ($('#custbuidemail').val().length <= 0){
					$('#custbuild_form_alert').html("<center><span style=\"color:red\"> Please tell us your email address</span></center>");
					return false;
				} 
				if ($('#custbuildmain option:selected').text() == 'Please Select'){
					$('#custbuild_form_alert').html("<center><span style=\"color:red\"> Please tell us what will be the main usage of the PC</span></center>");
					return false;
				}

				var url = "includes/submitcustompc.php?" + 
					"name=" + $('#custbuidname').val() + 
					"&email=" + $('#custbuidemail').val()+
					"&main=" + $('#custbuildmain option:selected').text()+
					"&second=" + $('#custbuildsecond option:selected').text()+
					"&monitor=" + $('#custbuildmonitor option:selected').text()+
					"&mouse=" + $('#custbuildmouse').is(':checked')+
					"&keyboard=" + $('#custbuildkeyboard').is(':checked')+
					"&speakers=" + $('#custbuildspeakers').is(':checked')+
					"&webcam=" + $('#custbuildwebcam').is(':checked')+
					"&printer=" + $('#custbuildprinter').is(':checked')+
					"&scanner=" + $('#custbuildscanner').is(':checked')+
					"&os=" + $('#custbuildos option:selected').text()+
					"&additional=" + $('#custbuildadditional option:selected').text()+
					"&delivery=" + $('#custbuildelivery').is(':checked')+
					"&setup=" + $('#custbuildsetup').is(':checked')+
					"&extended=" + $('#custbuildextended').is(':checked')+
					"&comments=" + $('#custbuildcomments').val();
				
				$(location).attr('href',url);
				
			});	
						

						
//todo 				
			$('#instoresubmit').click(function(){
				if( $('#genenq_form_name').val().length <= 0){
					$('#genenq_form_alert').html("<center><span style=\"color:red\"> Please tell us your name</span></center>");
					return false;
				}
				if ($('#genenq_form_phone').val().length <= 0){
					$('#genenq_form_alert').html("<center><span style=\"color:red\"> Please tell us your phone number </span></center>");
					return false;
				} 			
				if ($('#genenq_form_email').val().length <= 0){
					$('#genenq_form_alert').html("<center><span style=\"color:red\"> Please tell us your email address</span></center>");
					return false;
				} 
				if ($('#genenq_form_fault').val().length <= 0){
					$('#genenq_form_alert').html("<center><span style=\"color:red\"> Please tell us what's the problem </span></center>");
					return false;
				} 


				var url = "includes/submitcolleciton.php?" + 
					"name=" + $('#custbuidname').val() + 
					"&email=" + $('#custbuidemail').val()+
					"&main=" + $('#custbuildmain option:selected').text()+
					"&second=" + $('#custbuildsecond option:selected').text()+
					"&monitor=" + $('#custbuildmonitor option:selected').text()+
					"&mouse=" + $('#custbuildmouse').is(':checked')+
					"&keyboard=" + $('#custbuildkeyboard').is(':checked')+
					"&speakers=" + $('#custbuildspeakers').is(':checked')+
					"&webcam=" + $('#custbuildwebcam').is(':checked')+
					"&printer=" + $('#custbuildprinter').is(':checked')+
					"&scanner=" + $('#custbuildscanner').is(':checked')+
					"&os=" + $('#custbuildos option:selected').text()+
					"&additional=" + $('#custbuildadditional option:selected').text()+
					"&delivery=" + $('#custbuildelivery').is(':checked')+
					"&setup=" + $('#custbuildsetup').is(':checked')+
					"&extended=" + $('#custbuildextended').is(':checked')+
					"&comments=" + $('#custbuildcomments').val();
				
				//$(location).attr('href',url);
				
			});	
			
			
//todo 			
			$('#remotesubmit').click(function(){
				if( $('#genenq_form_name').val().length <= 0){
					$('#genenq_form_alert').html("<center><span style=\"color:red\"> Please tell us your name</span></center>");
					return false;
				}
				if ($('#genenq_form_phone').val().length <= 0){
					$('#genenq_form_alert').html("<center><span style=\"color:red\"> Please tell us your phone number </span></center>");
					return false;
				} 			
				if ($('#genenq_form_email').val().length <= 0){
					$('#genenq_form_alert').html("<center><span style=\"color:red\"> Please tell us your email address</span></center>");
					return false;
				} 
				if ($('#genenq_form_fault').val().length <= 0){
					$('#genenq_form_alert').html("<center><span style=\"color:red\"> Please tell us what's the problem </span></center>");
					return false;
				} 


				var url = "includes/submitcolleciton.php?" + 
					"name=" + $('#custbuidname').val() + 
					"&email=" + $('#custbuidemail').val()+
					"&main=" + $('#custbuildmain option:selected').text()+
					"&second=" + $('#custbuildsecond option:selected').text()+
					"&monitor=" + $('#custbuildmonitor option:selected').text()+
					"&mouse=" + $('#custbuildmouse').is(':checked')+
					"&keyboard=" + $('#custbuildkeyboard').is(':checked')+
					"&speakers=" + $('#custbuildspeakers').is(':checked')+
					"&webcam=" + $('#custbuildwebcam').is(':checked')+
					"&printer=" + $('#custbuildprinter').is(':checked')+
					"&scanner=" + $('#custbuildscanner').is(':checked')+
					"&os=" + $('#custbuildos option:selected').text()+
					"&additional=" + $('#custbuildadditional option:selected').text()+
					"&delivery=" + $('#custbuildelivery').is(':checked')+
					"&setup=" + $('#custbuildsetup').is(':checked')+
					"&extended=" + $('#custbuildextended').is(':checked')+
					"&comments=" + $('#custbuildcomments').val();
				
				//$(location).attr('href',url);
				
			});				
			
			
			
			$('#collectionsubmit').click(function(){
				if( $('#genenq_form_name').val().length <= 0){
					$('#genenq_form_alert').html("<center><span style=\"color:red\"> Please tell us your name</span></center>");
					return false;
				}
				if ($('#genenq_form_phone').val().length <= 0){
					$('#genenq_form_alert').html("<center><span style=\"color:red\"> Please tell us your phone number </span></center>");
					return false;
				} 			
				if ($('#genenq_form_email').val().length <= 0){
					$('#genenq_form_alert').html("<center><span style=\"color:red\"> Please tell us your email address</span></center>");
					return false;
				} 
				if ($('#genenq_form_fault').val().length <= 0){
					$('#genenq_form_alert').html("<center><span style=\"color:red\"> Please tell us what's the problem </span></center>");
					return false;
				} 


				var url = "includes/submitcollection.php?" + 
					"name=" + $('#genenq_form_name').val() + 
					"&email=" + $('#genenq_form_email').val() + 
					"&address=" + $('#genenq_form_address').val()+
					"&postcode=" + $('#genenq_form_postcode').val()+
					"&day=" + $('#genenq_form_day option:selected').text()+
					"&time=" + $('#genenq_form_time option:selected').text()+
					"&fault=" + $('#genenq_form_WhatIsAtFault option:selected').text()+
					"&make=" + $('#genenq_form_make').val() + 
					"&model=" + $('#genenq_form_model').val()+
					"&faultdesc=" + $('#genenq_form_fault').val();
				
				$(location).attr('href',url);
				
			});	
			
			
			
			
			
			
			
			
			
			
			$('#list1, #list2, #list3, #list4, #list5, #list6, #list7').hide();
			$('#link1').click(function(){
				$('#list1, #list2, #list3, #list4, #list5, #list6, #list7').hide(200);
				$('#list1').show(200);	
				return false;
			});
			
			$('#link2').click(function(){
				$('#list1, #list2, #list3, #list4, #list5, #list6, #list7').hide(200);
				$('#list2').show(200);
				return false;		
			});

			$('#link3').click(function(){
				$('#list1, #list2, #list3, #list4, #list5, #list6, #list7').hide(200);
				$('#list3').show(200);		
				return false;		
			});
			$('#link4').click(function(){
				$('#list1, #list2, #list3, #list4, #list5, #list6, #list7').hide(200);
				$('#list4').show(200);		
				return false;		
			});
			$('#link5').click(function(){
				$('#list1, #list2, #list3, #list4, #list5, #list6, #list7').hide(200);
				$('#list5').show(200);		
				return false;		
			});
			$('#link6').click(function(){
				$('#list1, #list2, #list3, #list4, #list5, #list6, #list7').hide(200);
				$('#list6').show(200);		
				return false;		
			});	
			$('#link7').click(function(){
				$('#list1, #list2, #list3, #list4, #list5, #list6, #list7').hide(200);
				$('#list7').show(200);		
				return false;		
			});

			});
			
	   $('.slide-out-div').tabSlideOut({
            tabHandle: '.handle',                     //class of the element that will become your tab
            pathToTabImage: 'images/contact.png', //path to the image for the tab //Optionally can be set using css
            imageHeight: '200px',                     //height of tab image           //Optionally can be set using css
            imageWidth: '40px',                       //width of tab image            //Optionally can be set using css
            tabLocation: 'left',                      //side of screen where tab lives, top, right, bottom, or left
            speed: 300,                               //speed of animation
            action: 'click',                          //options: 'click' or 'hover', action to trigger animation
            topPos: '150px',                          //position from the top/ use if tabLocation is left or right
            leftPos: '20px',                          //position from left/ use if tabLocation is bottom or top
            fixedPosition: true                    //options: true makes it stick(fixed position) on scroll
        });

    });

