  $(document).ready(function(){

				new AjaxUpload('#fileupload', {
				  // Location of the server-side upload script
				  action: 'upload.php',
				  // File upload name
				  name: 'fileupload',
				  // Additional data to send
				  data: {  },
				  // Submit file after selection
				  autoSubmit: true, 
				  // The type of data that you're expecting back from the server.
				  // Html (text) and xml are detected automatically.
				  // Only useful when you are using json data as a response.
				  // Set to "json" in that case.
				  responseType: false,
				  // Fired after the file is selected
				  // Useful when autoSubmit is disabled
				  // You can return false to cancel upload
				  // @param file basename of uploaded file
				  // @param extension of that file
				  onChange: function(file, extension){ },
				  // Fired before the file is uploaded
				  // You can return false to cancel upload
				  // @param file basename of uploaded file
				  // @param extension of that file
				  onSubmit: function(file, extension) { 
					  if(file.lastIndexOf(".jpg")==-1) 
					  { 
						alert('Please upload .jpg or .jpeg files only.'); 
						return false; 
					  } 
					  else 
					  { 
					  uploading();
					  } 
				  },
				  onComplete: function(file, response) { closeForm(); $('#laptop').html(response); }
				});

				

                $("#contactLink").click(function(){
                    if ($("#contactForm").is(":hidden")){
                        $("#contactForm").slideDown("slow");
                    }
                    else{
                        $("#contactForm").slideUp("slow"); 
                    }
                });
                
            });
            
			function uploading(){
                $("#messageUploading").show("slow");
           }
			
            function closeForm(){
				$("#messageUploading").hide();
                $("#messageSent").show("slow");
                setTimeout('$("#messageSent").hide();$("#contactForm").slideUp("slow")', 2000);
           }