jQuery(document).ready(function($) {
	$('.Core_Control_TextBox').placeholder();
	
	$('.Core_Control_Form').submit(function(event) {
		$(this).find('input[type=submit]').attr('disabled', true);
	});
	
	// Post "action" attribute of all submit button as $_POST['action'] when the submit button is clicked
	$('.Core_Control_Form').each(function() {
		var form = $(this);
		form.find('input[type=submit]').each(function() {
			if (form.find('input[name=action]').length == 0) {
				form.append('<input type="hidden" name="action" value="' + $(this).attr('action') + '"/>');
			} else {
				form.find('input[name=action]').val($(this).attr('action'));
			}
		});
	});
	/*
	$('.Core_Control_TextBox').blur(function() {
		if ($(this).val() == '') {
			$(this).val($(this).attr('title'));
			$(this).addClass('focus');
			$(this).removeClass('blur');
			$(this).data('hasValue', false);
		} else {
			$(this).data('hasValue', true);
		}
	});

	$('.Core_Control_TextBox').focus(function() {
		if ($(this).val() == $(this).attr('title') && $(this).hasClass('focus') && $(this).data('hasValue') != true) {
			$(this).val('');
			$(this).addClass('focus');
			$(this).removeClass('blur');
		}
	});
	$('.Core_Control_TextBox').blur();*/
});
