text: (function () {
  	var takePicture = document.querySelector("#take-picture"),
  		showPicture = document.querySelector(".show-picture");
  
  	if (takePicture && showPicture) {
  		// Set events
  		takePicture.onchange = function (event) {
  			// Get a reference to the taken picture or chosen file
  			var files = event.target.files,
  				file;
  			if (files && files.length > 0) {
  				file = files[0];
  				try {
  					// Create ObjectURL
  					var imgURL = URL.createObjectURL(URL.createObjectURL(file));
  
  					// Set img src to ObjectURL
  					showPicture.src = imgURL;
  					showPicture.style.display = "block";
  
  					// Revoke ObjectURL
  					URL.revokeObjectURL(imgURL);
  				}
  				catch (e) {
  					try {
  						// Fallback if createObjectURL is not supported
  						var fileReader = new FileReader();
  						fileReader.onload = function (event) {
  							showPicture.src = event.target.result;
  							showPicture.style.display = "block";
  						};
  						fileReader.readAsDataURL(file);
  					}
  					catch (e) {
  						// Display error message
  						var error = document.querySelector("#error");
  						if (error) {
  							error.innerHTML = "Neither createObjectURL or FileReader are supported";
  						}
  					}
  				}
  			}
  		};
  	}
  })();
  