jQuery(document).ready(function(){
	/*Placeholder Fix*/
	
	// This adds 'placeholder' to the items listed in the jQuery .support object. 
	jQuery(function() {
	   jQuery.support.placeholder = false;
	   test = document.createElement('input');
	   if('placeholder' in test) jQuery.support.placeholder = true;
	});
	// This adds placeholder support to browsers that wouldn't otherwise support it. 
	jQuery(function() {
	   	if(!jQuery.support.placeholder) { 
		  	var active = document.activeElement;
		  	jQuery(':text').focus(function () {
			 	if (jQuery(this).attr('placeholder') != '' && jQuery(this).val() == jQuery(this).attr('placeholder')) {
					jQuery(this).val('').removeClass('hasPlaceholder');
			 	}
		  	}).blur(function () {
			 	if (jQuery(this).attr('placeholder') != '' && (jQuery(this).val() == '' || jQuery(this).val() == jQuery(this).attr('placeholder'))) {
					jQuery(this).val(jQuery(this).attr('placeholder')).addClass('hasPlaceholder');
			 	}
		  	});
		  	jQuery(':text').blur();
		  
			jQuery(active).focus();
		  	jQuery('form:eq(0)').submit(function () {
			 	jQuery(':text.hasPlaceholder').val('');
		  	});
	   	}
	});
	
	
	jQuery('#password-text-as-placeholder').click(function(){
		jQuery("input[type='password']").focus();
		jQuery(this).hide();
	})
	jQuery("input[type='password']").focus(function(){
		jQuery('#password-text-as-placeholder').hide();
	}).blur(function(){
		if(jQuery(this).val().length <= 0){
			jQuery('#password-text-as-placeholder').show();
		}
	})
});

jQuery(window).load(function(){
	if(jQuery("input[type='password']").val().length > 0){
		jQuery('#password-text-as-placeholder').hide();
	}
})

