/*
$(document).ready(function() {
	
			// SHOW ALL FORMS FOR DEBUGGING AND DEV
			// $('#pay, #confirm').show();
				
			// A function that adds the title to the input field.
			$.titleLabel = function() { 
				$('input[title]').each(function() { // for each input with a title
					if($(this).val() === '') {  // if value is empty
						$(this).val($(this).attr('title')).css("color","#444"); // add the title and change the color
					}

					$(this).focus(function() { // when focused on an input with a title
						if($(this).val() === $(this).attr('title')) { // if the value is the title
							$(this).val('').css("color","#000"); // remove the value and change the color
						}
					});

					$(this).blur(function() { // when the input field is left
						if($(this).val() === '') { // and it is empty
							$(this).val($(this).attr('title')); // put back the title
						}
					});
				});
			};
			
			
			// runs the function .titleLabel 
			$.titleLabel(); 

			// handle the add and remove buttons and functionality
			$(function(){
				var removeLink = ' <input type="button" onclick="$(this).parent().remove(); return false" value="Remove" />';
				$('.btnAdd').dupe({append: removeLink}); 		
			});


			// the next step submit button function
			$('.nextStep').live('click',function(e){ // when nextstep is clicked

				if($('#label .required').val() === $(".required").attr('title'))
					{	
						alert("You did not enter a label on your first copyright.")
						return false;
					}
				
				if($('#label .select').val() === '')
					{
						alert("You did not choose the type on your first copyright.")
						return false;
					}
				
				$('#progressTracker .active').removeClass('active').next('span').addClass('active'); // change the progress tracker to the next span
				$(this).parents('fieldset').hide().next('fieldset').delay('2000').fadeIn(); // remove the current field set and add the new one
				$('#ajax-loading').fadeIn().delay('1100').fadeOut(); // show the ajax loading div while processing input
				e.preventDefault();
			
			});


			// function for the go back button
			var prevStep = $('.prevStep').click(function() {
				$('#progressTracker .active').removeClass('active').prev('span').addClass('active');
				$('#ajax-loading').fadeIn().delay('1100').fadeOut();
				$(this).parents('fieldset').hide().prev('fieldset').delay('2000').fadeIn();
				return false;	
				$.prevStep = new prevStep();
			});
			
});
*/
function addTitle(element) {
	if(element.value == '' || element.value == element.title) {  // if value is empty
		element.value = element.title;
		element.style.color = "#444"; // add the title and change the color
	}
}
function removeTitle(element) {
	if(element.value == '' || element.value == element.title) {
		element.value = '';
	}
	element.style.color = '#000';
}
